GLM 5.2
z-ai/glm-5.2GLM-5.2 is Z.ai's open-weight flagship text model released in June 2026 for long-horizon tasks, and the first GLM model to deliver that capability on a usable 1M-token context. Z.ai positions it for project-scale software engineering, deep debugging and full development workflows from requirements to deployable products, with steadier long-task execution and closer adherence to engineering standards. GLM-5.3 builds on the same base model with further post-training for coding.
- Input price
- $1.26
$1.40USD / 1M tokens - Output price
- $3.96
$4.40USD / 1M tokens - Cache read
- $0.23
$0.26USD / 1M tokens - Context window
- 1M
- Max output
- 32.8K
Specifications
- Input
- Text
- Output
- Text
Try the model
Playground
Write a prompt to try this model. Usage is billed at the prices shown.
Try a prompt
Your response will appear here
Choose an example or write a prompt, then click Run.
Start building
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/chat/completions" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "z-ai/glm-5.2",
"messages": [
{
"role": "user",
"content": "Hello"
}
],
"max_tokens": 2048
}
SANDBASE_JSON
)
printf '%s\n' "$result"Questions
FAQ
How do I call Z.ai GLM 5.2 through SandBase?
Create a SandBase API key, then send requests with the model ID "z-ai/glm-5.2" to Chat Completions API (/v1/chat/completions) at https://api.sandbase.ai. The request examples on this page show the exact payload.
How much does Z.ai GLM 5.2 cost?
$1.26 per 1M input tokens and $3.96 per 1M output tokens with the current 10% discount (list price $1.40 / $4.40), billed per request from your SandBase balance.
What is the context window of Z.ai GLM 5.2?
1M tokens of context, with up to 32.8K output tokens per response.
Which features does Z.ai GLM 5.2 support?
Z.ai GLM 5.2 supports reasoning, function calling, structured output. See Specifications above for the full list.
Do I need a separate Z.ai account?
No. One SandBase API key and balance gives you access to Z.ai GLM 5.2 and the other models in the catalog; you do not need to sign up with Z.ai separately.
