Introduction
GLM 5.3 is Z.ai's full-size long-context 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, so a whole body of material and the argument drawn from it fit in the same call.
Reasoning effort takes low, high or max, and max is already the default. temperature (0 to 1) and top_p are accepted, response_format returns JSON, up to 128 tools can be declared, message content is text only and replies stream over Server-Sent Events.
Key features & highlights
The material and the reasoning in one call
A long window is only half the claim; the other half is whether a chain of inference still holds together at that length. Load a master agreement with its amendments, or a specification with the code that implements it, and ask for conclusions that rest on passages hundreds of pages apart.
A top rung that earns its tokens
low, high and max separate on answers that need several things to be right at once: a deduction resting on three paragraphs that never appear together, or a change that must respect an invariant declared somewhere else. Keep max for those and use low for mechanical passes.
Room for the argument, not only the verdict
A reply can run to 131,072 tokens, enough for the conclusion, the alternatives that were ruled out and the citations that settle them. Ask for the reasoning explicitly when a reviewer will need to check it.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | At most 256 ordered turns, text content only. Put the material in one user message and the question plus output format in the system message. at least 1 items · at most 256 items |
reasoning_effort | No | low, high or max. max is the default, as on Z.ai's own API, and the rung for answers that must combine several facts correctly at once; 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. Default 32,768; raise it when you ask for the reasoning and not only the verdict. |
seed | No | Any integer. |
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 |
parallel_tool_calls | No | true or false, default true: the model may request several tool calls in one turn. Default: |
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 $1.05 / Output $3.30 per 1 million tokens
Use cases
Four documents and one question
Load a master agreement and its three amendments into one request and ask which clauses now contradict each other. The answer turns on two passages far apart, which is exactly where a retrieval layer breaks: it fetches what looks relevant to the question, not the pair that disagrees.
Incident review across every artefact
Put the alert timeline, the deploy log, the config diff and the on-call transcript in the same call and ask for the causal chain, with the evidence behind each link and the hypotheses that were discarded.
Agent backends where a call is a real action
Declare up to 128 functions - refund, entitlement change, ticket escalation - and let tool_choice decide. When a call performs a real action, knowing when not to call anything matters as much as the call itself.
Prompt guide & pro tips
Put the whole record in, not a summary of it
Load the material into a single user message, oldest first, and keep the system message for the question, the output format and the standard of evidence you expect back.
Ask for the reasoning, not only the verdict
POST https://api.spicyapi.ai/v1/chat/completions with {"model": "zai/glm-5.3", "messages": [{"role": "system", "content": "For every conflict, name both passages, quote one sentence from each, and say which one governs."}, {"role": "user", "content": "<the master agreement and its amendments>"}], "reasoning_effort": "max", "max_tokens": 32000, "temperature": 0}. temperature 0 makes a re-run on the same documents directly comparable.
Plan the timeout and the budget
The call is synchronous, and a full window at max effort can take minutes to come back, so size the client timeout for this request or stream the reply. max_tokens defaults to 32,768 and stops at 131,072; image and file parts are rejected, and a JSON response_format still needs parsing on your side.
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/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.







