Z AI logo

GLM-5.2

zai-org/glm-5.2

powerful coding with 1M context and long-horizon tasks.

cmd --model zai-org/glm-5.2
Intelligence index
52.6
Output speed
124.7 tok/s
Input
$1.40 /M
Output
$4.40 /M
Cache read
$0.26 /M
Agent-loop cost
$0.60 /M in
Context window
1M tokens
Released
June 16, 2026
Modalities

vs. the lineup

GLM-5.2 beside its stablemates and nearest rivals. The ◆ marks the best value in each column across every row shown.

pin a rival:
ModelIntelligenceCodingSpeedInput $/MOutput $/MBlended $/MContext
Muse Spark 1.256.872.2$1.25$4.25$21.05M
GLM-5.252.668.8124.7$1.40$4.40$2.151M
GLM-5.14155.8$1.40$4.40$2.15200K
GLM-540.6$1$3.20$1.55200K
GLM-5.3$1.40$4.40$2.151M
GLM-5.2 Fast$3$10.25$4.811M
DeepSeek V4 Pro (latest)pinned45.359.463.3$0.66$1.98$0.991M
DeepSeek V4 Flash (latest)pinned5269.1115.9$0.22$0.66$0.331M

coding performance

The Intelligence Index and its sub-scores, ranked against every scored model in the catalog. A metric that has not been measured for GLM-5.2 has been left empty.

Coding Index
68.8
#19 of 40 scored
Terminal-Bench
77.9
#17 of 40 scored
Intelligence Index
52.6
#15 of 46 scored
Long-context reasoning
76.7
reasoning across a long context
SciCode
50.5
scientific coding
GPQA Diamond
89.5
graduate-level QA

usage calculator

How far a month of credits goes on GLM-5.2.

Input tokensfresh prompt
800
Output tokensmodel reply
180
Cache read tokensre-read context
50K
cost / request $0.015 · in $1.40 · out $4.40 · cache $0.26 per M
fresh input 8%output 5%cache reads 87%
Requests / 30 days
671
$10 credits ÷ $0.015 per request
~134 quick fixes~27 bug fixes~4 feature PRs

what real work costs

Real coding tasks priced end to end on GLM-5.2, from a quick lookup to a full-repo agent run.

One agent task
$0.15
180K in at 75% cache hit, 12K out
What you pay
$0.79 /M
all-in across every token that task touched
Sticker input
$1.40 /M
cache reads bill at $0.26 /M instead
TaskTokens in · outGLM-5.2Muse Spark 1.2Claude Haiku 4.5
Quick lookup / one-liner8K · 1K$0.0074$0.0063$0.0065
Review a 500-line PR60K · 4K$0.05$0.05$0.04
Fix a bug (agent loop)180K · 12K$0.15$0.13$0.12
Refactor a module320K · 20K$0.27$0.23$0.21
Full-repo agent run900K · 45K$0.66$0.54$0.49

frequently asked

What is GLM-5.2 best for?
GLM 5.2 is a large-scale reasoning model from Z.ai. It supports text input and output with a 1M-token context window, and is suited for long-horizon agent workflows, project-level software engineering, and complex multi-step automation. Reasoning efforts high and xhigh are supported; xhigh maps to max reasoning. It is particularly strong at coding and tool use across long-running tasks, able to maintain engineering context and follow standards consistently through a full development workflow, from requirements to multi-platform deployment, in a single task.
How much does GLM-5.2 cost?
$1.40/M input and $4.40/M output, cache reads $0.26/M. In an agent loop most input is cache-read, so the effective input rate is about $0.60/M.
Which plan do I need?
Available on Go and above.
How do I switch to it?
Run cmd --model zai-org/glm-5.2, or type /model in a session and pick it. You can switch mid-session without losing context.

Ship code that matches your taste

Command Code is the AI coding agent that continuously learns your taste. Start for $1.

Benchmarks from Artificial Analysis (v4.1)commandcode.ai/models/glm-5-2