Introduction
GLM 5.3 Flash is Z.ai's long-context chat model, served here on one OpenAI-compatible endpoint at /v1/chat/completions. It reads up to 1,048,576 tokens across at most 256 messages and replies in up to 131,072, with reasoning effort at low, high or max.
max is the default. temperature (0 to 1) and top_p are accepted, response_format returns JSON objects, up to 128 tools can be declared per request, message content is text, images and video, and replies stream over Server-Sent Events when you ask for it.
Key features & highlights
Three rungs of reasoning effort
low, high and max sit on the same request body. low suits labelling and extraction across a large export, high suits review, and max - the default - is for the answers that have to hold up. Moving between them changes one string, not the integration.
A million tokens in, a finding out
The window takes 1,048,576 tokens and a reply reaches 131,072, about eight to one. That is the shape of reading an export, a transcript archive or a document set and returning labels, a summary table or a list of findings rather than rewriting what you sent.
Structured output for pipelines
response_format with json_object returns an object your code can parse, and up to 128 tools let the model call into your systems. Name every key in the system message so the shape stays stable across runs, and validate before anything downstream acts on it.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | At most 256 ordered turns. Content is a string, or an array of text, |
reasoning_effort | No | low, high or max. max is the default, as on Z.ai's own API, so a request that omits the field already gets the most careful setting; drop to low or high for bulk passes. |
stop | No | One sequence, as a string or a one-item array: Z.ai reads only one. The reply ends as soon as the model writes it, and the matched text is left out. at least 1 characters · at least 1 items · at most 1 items |
max_tokens | No | Caps the reply at 131,072 - an eighth of the read window. Default 32,768. |
temperature | No | 0 to 1, default 1. Hold it at 0 whenever the reply is parsed by code. |
top_p | No | 0.01 to 1, default 0.95. Adjust this or temperature, never both in the same comparison. |
tools | No | Up to 128 function definitions per request. at most 128 items |
tool_choice | No | auto, none, required, or an object naming one function. |
response_format | No | Ask for a JSON object and name every key in the system message. |
Pricing
Input $0.1275 / Output $0.425 per 1 million tokens
Use cases
Ticket triage at low effort
Send a whole ticket export with a fixed label set and ask for one label per ticket as JSON. At low effort the run stays inexpensive, and only the tickets your checks reject go back at high.
Questions across a transcript archive
Load months of meeting or support transcripts into one request and ask where a decision was made and who objected, with quotes. With nothing chunked away, the answer can cite a line from March and a line from July together.
Tool-calling assistants
Declare the functions your assistant is allowed to use - search, create, update - and let tool_choice decide when to call them. Results return as tool-role messages, so the full exchange stays inside one conversation.
Prompt guide & pro tips
Climb the effort ladder only where needed
Run the first pass at low, re-send what failed validation at high, and keep max for the few cases that still disagree. Keep the messages identical between passes so the effort setting is the only variable.
A labelling call you can copy
POST https://api.spicyapi.ai/v1/chat/completions with {"model": "zai/glm-5.3-flash", "messages": [{"role": "system", "content": "Label each ticket with one of: billing, access, bug, feature. Return JSON: {\"labels\": [{\"id\": ..., \"label\": ...}]}."}, {"role": "user", "content": "<the ticket export>"}], "reasoning_effort": "low", "max_tokens": 20000, "response_format": {"type": "json_object"}}. Parse the object, check every ID came back, and re-send the missing ones.
Budget and limits
The default max_tokens is 32,768 and reasoning tokens are billed as output too, so leave headroom above the answer you expect; values above 131,072 fail validation. Audio and file parts are rejected, and a JSON response_format shapes the reply but does not replace your own parsing.
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "zai/glm-5.3-flash/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.







