GLM-5.2
The previous GLM flagship, now a well-priced workhorse for teams that want a proven, stable model. It remains a strong all-rounder for reasoning and coding.
At a glance
Released
Jun 10, 2026
Provider
Zhipu AI
Context window
256,000 tokens
Max output
64,000 tokens
Modalities
Text + image → text
Knowledge cutoff
March 2026
API model ID
glm-5.2License
Open weights (MIT)
Pricing
Standard
Input$1.40 / 1M
Output$4.40 / 1M
A typical 1,500-token prompt with a 650-token answer costs ≈ $0.005 on the standard tier. Run your own prompt through the calculator →
What's new vs the previous model
Compared withGLM-5.1 (March 2026)
- Broader tool-use reliability than GLM-5.1
- Improved long-context coherence
- Superseded by GLM-5.3, so no longer the frontier option
Best use cases
General assistants
Serves broad reasoning and writing needs at a mature, stable quality bar.
Code generation
Writes and reviews code reliably across common languages.
Migration target
A safe self-hosted baseline for teams not yet moving to 5.3.
Strengths & limitations
Strengths
- Proven and stable
- Open weights
- Good value
Limitations
- Behind GLM-5.3 on reasoning
- Older knowledge cutoff
How to test it
- No-code: open chat.z.ai and pick GLM-5.2 from the model switcher — no API key needed.
- Playground: sign in to the Z.ai API console and run prompts in the workbench, then copy the generated code.
- API: create a key in the Z.ai API console and call the API (example below).
curl https://api.z.ai/api/paas/v4/chat/completions \
# OpenAI-compatible endpoint
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "Explain tokenization in one paragraph."}]
}'