Call GLM-5.3-Flash through OpenRouter’s OpenAI-compatible chat-completions endpoint with the model id z-ai/glm-5.3-flash, or through Z.ai’s own API with the id glm-5.3-flash. This page is the technical reference — endpoint, headers, parameters, streaming, images, tool calling, errors and fallbacks — verified against the live listing. If you built against stealth/ox-alpha during the Ox Alpha preview, start with the migration section: the old ID is delisted and there is no redirect.
Endpoint and model id
Nothing about the endpoint, authentication or request shape changed at the reveal. The only breaking change is the model identifier itself.
| Base URL | https://openrouter.ai/api/v1 |
| Chat endpoint | POST https://openrouter.ai/api/v1/chat/completions |
| Model id | z-ai/glm-5.3-flash |
| Former model id | stealth/ox-alpha — retired August 26, 2026. Delisted, no redirect. |
| Direct Z.ai API | glm-5.3-flash · docs.z.ai/guides/llm/glm-5.3-flash |
| Auth | Authorization: Bearer <your OpenRouter key> |
| Optional headers | HTTP-Referer and X-Title (identify your app on OpenRouter’s leaderboard) |
| Price | $0.075 / 1M input · $0.015 / 1M cached input · $0.25 / 1M output (promotional until Sept 9, 2026; $0.15 / $0.03 / $0.50 after) |
| Current top-provider context / max output | 1,048,576 / 131,072 tokens; OpenRouter model-level metadata may show a higher context depending on provider |
| Input | text, image, video · Output: text |
Minimal request (curl)
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "z-ai/glm-5.3-flash",
"messages": [{"role": "user", "content": "Explain what a stealth model is in two sentences."}]
}'
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="sk-or-...",
)
resp = client.chat.completions.create(
model="z-ai/glm-5.3-flash",
messages=[{"role": "user", "content": "Refactor this function for clarity:\n\n..."}],
max_tokens=4096,
stream=True,
)
for chunk in resp:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)
JavaScript (fetch, streaming)
const res = await fetch("https://openrouter.ai/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.OPENROUTER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "z-ai/glm-5.3-flash",
stream: true,
messages: [{ role: "user", content: "Summarize the following document: ..." }],
}),
});
// Server-sent events: each line is "data: {json}" and the stream ends with "data: [DONE]"
Supported parameters
The listing declares exactly these parameters. Anything else is ignored or rejected by the router.
| Parameter | Notes |
|---|---|
max_tokens | Up to 131,072 |
temperature | Default 1 |
top_p | Default 0.95 |
top_k | Supported |
reasoning / reasoning_effort | Reasoning is mandatory and on by default at max; high and low are accepted. You cannot turn it off. |
include_reasoning | Return the thinking tokens alongside the answer |
tools / tool_choice | OpenAI-style function calling |
response_format | Structured / JSON output |
Reasoning effort
{
"model": "z-ai/glm-5.3-flash",
"reasoning": { "effort": "low" },
"messages": [{ "role": "user", "content": "Quick answer: is 1,048,576 a power of two?" }]
}
Lower effort means fewer thinking tokens and faster replies; max is the default and the right choice for hard coding or multi-step tasks.
Images and video
{
"model": "z-ai/glm-5.3-flash",
"messages": [{
"role": "user",
"content": [
{ "type": "text", "text": "What is wrong in this screenshot?" },
{ "type": "image_url", "image_url": { "url": "data:image/png;base64,...." } }
]
}]
}
Image and video inputs use OpenRouter’s standard multimodal content parts. Audio input is rejected by the provider.
Tool calling and JSON output
{
"model": "z-ai/glm-5.3-flash",
"messages": [{ "role": "user", "content": "What is the weather in Lisbon?" }],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"parameters": { "type": "object", "properties": { "city": { "type": "string" } }, "required": ["city"] }
}
}],
"tool_choice": "auto"
}
For schema-shaped replies, send "response_format": {"type": "json_object"} (or a JSON schema) and instruct the model in the prompt to answer in JSON.
Errors you will actually see
| Status | Meaning | What to do |
|---|---|---|
| 401 | Key missing or invalid ("User not found.") | Check the key; create one at openrouter.ai/settings/keys |
| 402 | Insufficient credits | The model is paid now. Top up the account behind the key — a $0 balance worked during the preview but does not any more. |
| 404 / 400 on the model | Model id no longer listed | Almost always a leftover stealth/ox-alpha. Switch to z-ai/glm-5.3-flash. |
| 429 | Rate-limited | Back off and retry; limits are not published for this listing |
| 5xx | Provider or router error | Retry with backoff; use a fallback model |
Migrating from stealth/ox-alpha
Three things to change, in order of how badly they will break you:
- The model ID.
stealth/ox-alpha→z-ai/glm-5.3-flash. There is no redirect, so the old ID returns an error rather than quietly costing you money. Grep your codebase, your environment files and your agent configs — the string tends to hide in more places than you remember. - Billing. The account behind your key needs credit. During the preview a zero balance was fine; now it returns 402.
- Cost assumptions. Anything that looped freely against a $0 model — retries, evaluation harnesses, batch jobs — now has a bill attached. It is a cheap model, but it is not a free one. Check your expected spend before turning a loop back on.
What does not change: the base URL, the authentication header, every supported parameter, the context and output limits, and the multimodal content format. A single string replacement plus a funded account is usually the entire migration.
Build in a fallback
Pass OpenRouter’s models array to fail over automatically if the primary model errors or rate-limits:
{
"models": ["z-ai/glm-5.3-flash", "openrouter/free"],
"messages": [ ... ]
}
Our own browser chat does the same: if the primary model returns 404/400/402/429 it moves to the next model in its chain, and the model switcher lets you pick a free one directly.
Rate limits, data and terms
- Rate limits: the listing publishes no per-request limits. Expect 429s under heavy load and retry with backoff.
- Data: the Stealth Program terms no longer apply. Usage falls under the standard OpenRouter terms and Z.ai’s terms, and the processor is identified: Z.ai. Normal commercial diligence applies — check the terms against your own data-governance requirements rather than assuming either way.
- Availability: the model is a generally-available product now rather than a time-limited preview. The promotional price, however, does expire on September 9, 2026. The tracker re-checks the listing twice a day.
- Self-hosting: the weights are MIT-licensed as
zai-org/GLM-5.3-Flashon Hugging Face. SGLang, vLLM, TokenSpeed, KTransformers and others are documented deployment paths if you would rather not send prompts to anyone at all.
Related: GLM-5.3-Flash reference · Setup guide and free alternatives · Use it in Cursor, Cline, Continue and Aider · Pricing · What Ox Alpha was.
Sources and verification
Last substantively reviewed: August 27, 2026. Reviewed by: OxAlpha.chat Editorial Team.
How we verified this page
We checked the request fields against each platform’s own API documentation. Z.ai uses model code glm-5.3-flash; OpenRouter uses z-ai/glm-5.3-flash. Code samples use placeholders and never contain a working key.
Primary sources
- Official model settings: Z.ai GLM-5.3-Flash overview — documents the model code, recommended parameters, context and supported input types.
- API authentication: Z.ai API introduction — documents the endpoint and bearer-token authentication.
- API request schema: Z.ai Chat Completion reference — documents messages, streaming, tools and reasoning fields.
- OpenRouter integration: OpenRouter API quickstart — documents the OpenAI-compatible endpoint, headers and SDK examples.
- Platform metadata: OpenRouter GLM-5.3-Flash listing — verifies the OpenRouter model slug and live route details.
Found a factual error or a changed price? Send us the page URL and supporting source; corrections follow our editorial policy.