GLM 5.3 API: Endpoints, Parameters & Python Examples
Quick answer: The GLM 5.3 API (model id glm-5.3) is rolling out at $1.40 per 1M input / $4.40 per 1M output tokens — the same rate as GLM 5.2. It's OpenAI- and Anthropic-compatible, requires thinking always enabled (reasoning_effort: low/high/max), and supports 1M-token context, 128K output, function calling with streaming parameters, and structured output.
TL;DR
| Field | GLM 5.3 API |
|---|---|
| Model ID | glm-5.3 |
| Price | $1.40 in / $4.40 out per 1M ($0.26 cached) |
| Context / Output | 1M tokens / 128K |
| Thinking | Always on — reasoning_effort low/high/max |
| Protocols | OpenAI Chat Completion / OpenAI Response / Anthropic Message |
| Status | Rolling out ("coming soon" per official docs) |
Endpoints
Z.AI publishes three compatible endpoints (all already live in docs):
| Protocol | Base URL |
|---|---|
| OpenAI Chat Completion | https://api.z.ai/api/coding/paas/v4 |
| OpenAI Response | https://api.z.ai/api/v1 |
| Anthropic Message | https://api.z.ai/api/anthropic |
The OpenAI Chat Completion endpoint is the most widely used — and the one that works for previous Coding Plan subscribers (including expired ones) during rollout.
Required Parameters: Thinking Is Always On
The one breaking change vs GLM 5.2: you can no longer disable thinking.
{
"model": "glm-5.3",
"thinking": { "type": "enabled" },
"reasoning_effort": "max"
}
| Parameter | Values | Default | Notes |
|---|---|---|---|
thinking.type | enabled | enabled | disabled is rejected |
reasoning_effort | low, high, max | max | max recommended for coding |
Migration: set enabled + low before switching the model ID, then tune up.
Python Example (OpenAI-Compatible)
from openai import OpenAI
client = OpenAI(
base_url="https://api.z.ai/api/coding/paas/v4",
api_key="YOUR_ZAI_API_KEY",
)
resp = client.chat.completions.create(
model="glm-5.3",
messages=[
{"role": "user", "content": "Write a Python function that checks if a number is prime, with a docstring."}
],
extra_body={
"thinking": {"type": "enabled"},
"reasoning_effort": "max",
},
)
print(resp.choices[0].message.content)
Pricing
| Model | Input/1M | Cached/1M | Output/1M |
|---|---|---|---|
| GLM 5.3 | $1.40 | $0.26 | $4.40 |
| GLM 5.2 | $1.40 | $0.26 | $4.40 |
| Kimi K3 (ref) | $3.00 | – | $15.00 |
At $0.68 per Artificial Analysis Intelligence Index task, GLM 5.3 is the cheapest top-tier model per unit of measured intelligence — though it's also the most verbose of the group (~170M output tokens across AA's eval suite vs 72M median).
Capabilities
- 1M-token context — repo-scale code fits in one request
- 128K max output
- Function calling — now with streaming parameter output
- Structured output — JSON mode supported
- Streaming — real-time token delivery
- Text only — no vision/audio input (same as 5.2)
Availability Status
- Coding Plan: live (all subscribers on 5.3)
- ZCode: live
- API: rolling out — endpoints published, pricing confirmed
- OpenRouter: not listed yet (z-ai/glm-5.2 is newest)
FAQ
What is the GLM 5.3 API model ID?
glm-5.3.
How much does the GLM 5.3 API cost? $1.40 per 1M input, $4.40 per 1M output, $0.26 cached input.
Is GLM 5.3 API OpenAI-compatible? Yes — OpenAI Chat Completion and Response protocols, plus an Anthropic-compatible endpoint.
What changed from GLM 5.2 API?
Thinking is always enabled — use reasoning_effort (low/high/max) instead of thinking.type: "disabled".
Is the GLM 5.3 API available now? Rolling out — endpoints are published and pricing confirmed; Z.AI says general availability is coming soon.
Sources
- Z.AI Docs: GLM-5.3
- Z.AI Docs: Pricing
- Z.AI: GLM-5.3: Frontier Coding with Emergent Cyber Capabilities (August 14, 2026)
Last updated: August 18, 2026




