Z.aiglm-5.2
GLM-5.2
Long-horizon coding and agentic engineering, at a lower price.
GLM-5.2 is Z.ai's flagship for long-horizon coding and agentic engineering, with a million-token context — the cheaper sibling of GLM-5.3 for work that runs long.
- Agentic coding
- Long context
- Balanced cost
Model details
- Context window
- 1M tokens
- Max output
- 128K tokens
- Input
- Text
- Output
- Text
- Capabilities
- Reasoning, Tool calling, Streaming, JSON output
- Interfaces
- OpenAI-style Chat Completions, Anthropic-style Messages, OpenAI-style Responses
Pricing
Per 1M tokens. The Inferray price is what you are charged — no gateway fee is added on top of it.
| Metric | Price |
|---|---|
| Input | $1.40 |
| Cached input | $0.26 |
| Output | $4.40 |
Why teams pick it
- Flagship coding and agentic engineering
- 1M-token context for whole-repo work
- Reasoning and tool calling included
Call GLM-5.2
GLM-5.2 answers on any of the APIs below — pick the one your code already speaks and just swap in your Inferray key.
/v1/chat/completionsOpenAI-style Chat Completions · openai SDK or plain HTTP
curl https://api.inferray.com/v1/chat/completions \
-H "Authorization: Bearer inferray_..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "ship it"}]
}'/v1/messagesAnthropic-style Messages · @anthropic-ai/sdk SDK or plain HTTP
curl https://api.inferray.com/v1/messages \
-H "Authorization: Bearer inferray_..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "ship it"}]
}'/v1/responsesOpenAI-style Responses · openai SDK or plain HTTP
curl https://api.inferray.com/v1/responses \
-H "Authorization: Bearer inferray_..." \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"input": "ship it"
}'