GLM-5.3

Beta
View as Markdown

GLM-5.3 is a large-scale reasoning model built for complex software engineering and long-horizon agent tasks. It supports text input and output with a 1,048,576-token context window.

GLM-5.3 is available in beta. Access is granted per API key — contact us to request access.

At a glance

Model IDglm5.3
Best forComplex software engineering and long-horizon agent tasks
Context window1,048,576 tokens
Input → outputText → text
Reasoninglow, high, or max (default when omitted) — see Reasoning
Tool callingSupported (parallel tool calls only — see API reference)
APIsPOST /v2/chat/completions and POST /v2/responses
Pricing₹126 input · ₹23.4 cached input · ₹396 output per 1M tokens; reasoning is billed as output (Pricing)

Key capabilities

Software engineering

Reason across large repositories, implementation plans, and multi-step coding tasks.

Long-horizon agents

Use tool calling and extended context for workflows that require many dependent steps.

Long context

Process up to 1,048,576 tokens across the prompt and generated output.

Streaming

Receive reasoning and final-answer deltas as server-sent events.

Quickstart

from sarvamai import SarvamAI
client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")
response = client.chat.completions_v2(
model="glm5.3",
messages=[
{
"role": "user",
"content": "Explain the difference between a B-tree and a B+ tree index.",
}
],
temperature=1,
top_p=0.95,
max_tokens=2000,
)
print(response.choices[0].message.content)

API reference

Call POST /v2/chat/completions or POST /v2/responses with model: "glm5.3". Request fields (n, logprobs, parallel_tool_calls, stream, and the rest) are defined in those API references — not duplicated on this model page.

Reasoning

GLM-5.3 has three reasoning modes — low, high, and max — but which values you can pass depends on the API:

RouteFieldAccepted values
Chat Completion V2reasoning_effort"low", "high", or "max"; omitting the field also gives max
Responsesreasoning.effort"low" or "high" only. To get max-level reasoning, omit the field — sending the literal string "max" returns 400

Read the reasoning trace from choices[].message.reasoning_content on chat, or from the reasoning item’s summary[0].text in output on Responses (its content field is null there). Reasoning tokens are billed as output tokens either way, and count against max_tokens on chat (defaults to 2048 when omitted) or max_output_tokens on Responses (no default — omitting it means unbounded generation).

Response fields (chat)

FieldNotes
choices[].message.reasoning_contentReasoning trace; billed as completion tokens.
usage.completion_tokens_details.reasoning_tokensTokens spent on reasoning.

Full response shape: Chat Completion V2.

Known limitations

  • Output token budget. max_tokens on chat defaults to 2048 when omitted; max_output_tokens on Responses has no default and allows unbounded generation. Reasoning counts against whichever budget applies, so a small max_tokens on chat can leave little or no room for the actual answer.
  • Parallel tool calls. GLM-5.3 only respects parallel_tool_calls: true (or omitting the field). Passing false is accepted without error, but the model can still return more than one tool call in a turn.
  • Context-length checks are approximate, and more conservative for Latin-script text than for Indic scripts. Treat the model’s own limit as authoritative.

Parameter errors (n, logprobs, stop, and similar) are documented on Chat Completion V2.

Limits and errors

AreaLimit or conditionAPI responseRecommended action
ContextPrompt tokens plus max_tokens exceed 1,048,576400 invalid_request_errorShorten the prompt or reduce max_tokens.
Outputmax_tokens exceeds 1,048,576400 invalid_request_errorSet max_tokens within the context window.
ModalityRequest includes image input400 invalid_request_errorSend text input only.
ParametersMore than four stop sequences503 model_overloaded (may retry)Send at most four stop strings.
Request bodyWrong JSON types (serde validation)400 invalid_request_errorMatch types in the API Reference; read error.message.
PayloadBody larger than 10 MB413Shrink text or inline images.
AuthenticationAPI key is missing or invalid403 invalid_api_key_errorCheck the api-subscription-key header.
AccessAPI key does not have beta access400 invalid_request_errorRequest beta access.
ModelModel ID is unknown or unavailable404 not_found_errorConfirm the ID with GET /v2/models.
QuotaNo credits remain402 insufficient_quota_errorAdd credits in the dashboard.
Rate limitRequest or concurrency limit is exceeded429 rate_limit_exceeded_errorBack off and retry.
AvailabilityModel remains overloaded after retries503 model_overloadedRetry later.