# GLM-5.3 Flash API on TokenRa Model ID: `glm-5.3-flash` Other model IDs: `glm‑5.3‑flash‑discounted` Get an API key: https://tokenra.io/register?utm_source=llms-agent&utm_medium=model-llms Updated: 2026-10-30 > GLM-5.3 Flash is Z.ai's first natively multimodal GLM-5 model. Z.ai lists 320B total and 18B active parameters, a 1M-token context window and up to 128K output tokens. Thinking is always on and `reasoning_effort` sets its depth. It previewed under the code name Ox Alpha. - Provider: Zhipu AI - Type: Text model - Context: 1M tokens - Input: Text, image - Output: Text with reasoning ## Pricing Rates in the TokenRa console when this file was last updated, in US dollars for the default group. The live price list is authoritative: https://tokenra.io/pricing (JSON: https://tokenra.io/api/pricing). - `glm-5.3-flash`: $0.14 per 1M input tokens, $0.52 per 1M output tokens, $0.04 per 1M cached input tokens - `glm‑5.3‑flash‑discounted`: $0.05 per 1M input tokens, $0.194 per 1M output tokens, $0.01 per 1M cached input tokens ## Capabilities & endpoints Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23. - `POST https://tokenra.io/v1/chat/completions`: OpenAI SDK with `base_url="https://tokenra.io/v1"`. Auth: `Authorization: Bearer`. Recommended. - `POST https://tokenra.io/v1/responses`: OpenAI Responses API, same SDK and key. Text answer in `output_text`. - `POST https://tokenra.io/v1/messages`: Anthropic SDK or Claude Code with base URL `https://tokenra.io`. Auth: `x-api-key` (or Bearer) plus `anthropic-version`. ### Model IDs | Model ID | Notes | | --- | --- | | `glm-5.3-flash` | Main ID. Everything on this page was tested with it. | | `glm‑5.3‑flash‑discounted` | Same model at a discounted rate; it behaved the same in every test. The ID is written with non-breaking hyphens (U+2011), so copy it from this page: typing ordinary hyphens returns `model_not_found`. | ## Example Set `TOKENRA_API_KEY` to your API key first. The docs page has the same example in Python, JavaScript and Java. ```bash curl https://tokenra.io/v1/chat/completions \ -H "Authorization: Bearer $TOKENRA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.3-flash", "messages": [ {"role": "system", "content": "You are a concise technical assistant."}, {"role": "user", "content": "Explain in two sentences what an API gateway does."} ] }' ``` ## Request parameters Fields for `POST /v1/chat/completions`. Everything listed was accepted by the model in testing. | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | The model ID to call, for example `glm-5.3-flash`. | | `messages` | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. `content` can be a string or an array of `text` and `image_url` parts. | | `stream` | boolean | No | Return the answer as server-sent events. Default `false`. | | `stream_options` | object | No | With `{"include_usage": true}`, the last chunk carries `usage` and an empty `choices` array. | | `max_tokens` | integer | No | Upper limit for generated tokens. Reasoning tokens count toward it: if it is too low the model can spend it all on reasoning and return no text (`finish_reason: "length"`). | | `temperature` | number | No | Sampling temperature. | | `top_p` | number | No | Nucleus sampling threshold. Usually tune either this or temperature. | | `presence_penalty` | number | No | Penalises tokens that already appeared, nudging the model toward new topics. | | `frequency_penalty` | number | No | Penalises frequent tokens to reduce repetition. | | `response_format` | object | No | `{"type": "json_object"}` returns a JSON object. `{"type": "json_schema", "json_schema": {...}}` returns JSON that matches your schema (tested with `strict: true`). | | `tools` | array | No | Function tools the model may call (`type: "function"`). | | `tool_choice` | string / object | No | `auto`, `none`, `required`, or a specific function. | | `parallel_tool_calls` | boolean | No | Allow several tool calls in one response. | | `reasoning_effort` | string | No | Thinking depth: `low`, `high` or `max`. The vendor default is `max`. | | `user` | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. | **Not supported by this model** - `max_completion_tokens` is ignored by this model. Use `max_tokens` to cap the output. ### Other formats | Format | Required fields | Answer location | | --- | --- | --- | | OpenAI Responses | `model`, `input` | `output_text` | | Anthropic Messages | `model`, `max_tokens`, `messages` | `content[]` blocks of type `text` | ## Response format **Example response** ```json { "id": "chatcmpl-1792766122484", "object": "chat.completion", "created": 1792766122, "model": "glm-5.3-flash", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.", "reasoning_content": "The user wants two sentences about API gateways..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 26, "completion_tokens": 58, "total_tokens": 84, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 21 } } } ``` | Field | Type | Description | | --- | --- | --- | | `id` | string | Completion ID. Include it when you contact support. | | `object` | string | `chat.completion`, or `chat.completion.chunk` when streaming. | | `created` | integer | Unix timestamp in seconds. | | `model` | string | The model that produced the answer. | | `choices[].message.content` | string | The answer text. | | `choices[].message.reasoning_content` | string | The model's reasoning, returned separately from the answer. | | `choices[].message.tool_calls` | array | Tool calls requested by the model, when `tools` were sent. | | `choices[].finish_reason` | string | `stop`, `length` or `tool_calls`. | | `usage` | object | `prompt_tokens`, `completion_tokens`, `total_tokens`, plus `prompt_tokens_details.cached_tokens` and `completion_tokens_details.reasoning_tokens`. | With `stream: true` the answer arrives as `data:` lines of `chat.completion.chunk` objects and ends with `data: [DONE]`. ## Errors & limits ### Common errors | HTTP | error.code | Meaning | What to do | | --- | --- | --- | --- | | `401` | - | Missing, wrong or deleted API key. The message is `Invalid token`. | Check the `Authorization: Bearer` header and the key in the console. | | `400` | - | The body is not valid JSON. | Fix the JSON and send `Content-Type: application/json`. | | `500` | `invalid_request` | A required field is missing, for example `messages`. | Add the field named in the message. Retrying will not help. | | `403` | `insufficient_user_quota` | Your balance or plan quota is used up. | Top up in the console, then retry. | | `503` | `model_not_found` | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with `GET /v1/models`. | | `429` | - | Too many requests. | Back off exponentially and retry. | | `5xx` | - | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. | ### Limits and notes - Image input was tested with an `image_url` part that points to a public HTTPS image. - Reasoning is returned in `reasoning_content`, separate from the answer in `content`. Keep it out of what you show users unless you want to display it. - In testing, `reasoning_effort` `low` or `high` answered a short question with 0-3 reasoning tokens; the default `max` used about 100. ## More - [GLM-5.3 Flash API docs page](https://tokenra.io/docs/glm-5.3-flash.html): parameter tables and code samples in cURL, Python, JavaScript and Java - [GLM-5.3 Flash overview and pricing page](https://tokenra.io/models/glm-5-3-flash.html) - [API basics](https://tokenra.io/docs/common.html): base URL, authentication, errors, retries - [Quickstart](https://tokenra.io/docs/quickstart.html): create a key and send a first request - [All models](https://tokenra.io/docs/models.html): every model ID - [Chinese version of this guide](https://tokenra.io/zh/docs/glm-5.3-flash/llms.txt) - [Site index for agents](https://tokenra.io/llms.txt) --- Canonical version of this document: https://tokenra.io/docs/glm-5.3-flash/llms.txt