October 2 routing correction: This page preserves its July evidence and recommendations. Z.AI now documents GLM-5.3; GLM-5.2 scores and prices below do not evaluate that revision. Historical status here does not imply API retirement. Use the selected model hub before choosing a new route.
GLM-5.2 is the July best value coding model to test first when supported tools fit. Z.AI documents it as a flagship text model with 1M context, 128K maximum output, and the same public API price anchor as GLM-5.1: $1.40 input / $0.26 cached input / $4.40 output per 1M tokens.
The useful buyer claim is narrow: GLM-5.2 is a low-cost, long-context coding lane to test in supported tools. Artificial Analysis now gives it independent shortlist evidence, while Z.AI publishes strong coding-agent numbers. Neither source proves it will replace Claude Opus in your repo. Treat GLM-5.2 as the value lane to test, and keep Opus 4.8 or GPT-5.5 for final arbitration until your own tasks say otherwise.
Best next click: choose the model first, then compare the harness. Use Pi vs ZCode vs OpenCode for execution behavior and the Z.AI GLM Coding Plan guide for subscription rules. For the Kimi alternative, use Kimi K2.7 Code.
Quick Facts
| Spec | GLM-5.2 |
|---|---|
| Provider | Z.AI |
| Model ID | glm-5.2 |
| Input / output | Text / text |
| Context window | 1M tokens |
| Max output | 128K tokens |
| API pricing | $1.40 input / $0.26 cached input / $4.40 output per 1M tokens |
| Useful for | Long-context coding, repo audits, agent workflows, supported-tool budget lane |
| Independent signal | Artificial Analysis Intelligence Index 51; GDPval-AA v2 1524; leading open-weights model in its June 2026 article |
| Vendor signal | Z.AI-published SWE-Bench Pro 62.1 and Terminal-Bench 2.1 81.0 |
| Caveat | Output-token efficiency and repo-specific patch quality need local evals before production routing |
What Changed From GLM-5.1
GLM-5.1 remains useful historical and prior-release context, but the July comparison used GLM-5.2. The practical differences are:
| Question | GLM-5.2 answer |
|---|---|
| “Is this the newest GLM coding model?” | No. This is the July GLM-5.2 record; Z.AI now documents GLM-5.3 separately. |
| “What is the big spec change?” | 1M context versus GLM-5.1’s earlier 200K guide context. |
| “Did API price go up?” | Current public pricing lists GLM-5.2 at the same $1.40 / $4.40 anchor as GLM-5.1. |
| “Should I rewrite old GLM-5.1 mentions?” | Only on current-facing discovery surfaces. Historical pages can keep GLM-5.1 context. |
Pricing And Tool Fit
| Lane | Price anchor | Best fit | Caveat |
|---|---|---|---|
| GLM-5.2 API | $1.40 input / $4.40 output per 1M | API tests, long-context coding evals, OpenAI-compatible routing | Token costs still compound in agent loops |
| GLM Coding Plan | Starts at $18/month | Supported coding tools such as Claude Code, OpenCode, Cursor, Cline, Kilo Code, Roo Code, Goose, and related paths | Subscription quota applies only through supported tools/products |
| GLM-5.1 | Same public price anchor | Prior-release context and existing integrations | No longer the best current search destination |
The Coding Plan is not a universal unlimited API plan. Use it when your tool path is supported and you can route advanced work to GLM-5.2 deliberately instead of burning quota on every small prompt.
GLM-5.2 vs Opus 4.8 Value Math
Compare API pricing by lane, not by slogan.
| Lane | Input / output per 1M tokens | Cost read |
|---|---|---|
| GLM-5.2 API | $1.40 / $4.40 | 72% lower input and 82.4% lower output than Opus 4.8 API list pricing |
| Claude Opus 4.8 API | $5.00 / $25.00 | Premium Claude arbitration and hard-review lane |
| GLM Coding Lite | $18/month | Subscription-style supported-tool test lane |
| Claude Max 20x | $200/month | Subscription comparison only; not API pricing |
“90% cheaper” is acceptable only for labeled subscription comparisons such as $18 GLM Coding Lite versus a $200 Claude Max plan. It is not the API comparison. The API comparison is still large enough to matter: GLM-5.2 is about 72% lower on input and 82% lower on output than Opus 4.8, before retries, cache behavior, prompt length, and failed patches.
The catch is output efficiency. Artificial Analysis notes that GLM-5.2 uses more output tokens than some frontier alternatives, so raw token price is not the same as cost per successful task. Track total input, output, retries, and human review time on your own repo.
Benchmark Signals
Use the benchmark stack as a shortlist, not a purchase order.
| Source | GLM-5.2 signal | How to use it |
|---|---|---|
| Artificial Analysis | Intelligence Index 51, GDPval-AA v2 1524, leading open-weights placement | Independent model-quality signal across the AA benchmark mix |
| Z.AI | SWE-Bench Pro 62.1, Terminal-Bench 2.1 81.0 | Vendor-published coding-agent signal; needs local confirmation |
| AIHackers | No site-owned GLM-5.2 repo eval yet | Run the eval plan below before making it default |
That combination is strong enough to make GLM-5.2 the July value pick to test. It is not enough to call it an Opus replacement.
GLM-5.2 vs Kimi K2.7 Code
| Decision point | GLM-5.2 | Kimi K2.7 Code |
|---|---|---|
| Context | 1M | 256K-class |
| Output ceiling | 128K | Kimi docs default K2.7 Code max tokens to 32K |
| API pricing | $1.40 input / $0.26 cached input / $4.40 output | $0.19 cache-hit input / $0.95 cache-miss input / $4.00 output |
| Fast lane | Coding Plan subscription path | K2.7 Code HighSpeed API at higher token prices |
| Best first test | Whole-repo context and long-horizon refactors | Kimi-native coding, multimodal tool calls, and cheaper cache-hit workloads |
Use GLM-5.2 vs Kimi K2.6/K2.7 when you are choosing between Z.AI and Kimi for a cheap coding-model lane.
Eval Plan
Do not buy or route production on a vendor chart alone. A useful first pass:
| Test | What to ask GLM-5.2 to do | Pass signal |
|---|---|---|
| Repo audit | Read project docs and map modules, contracts, and risks | Accurate boundaries, no invented files, useful follow-up plan |
| Bug fix | Fix one real failing test | Small correct patch, no unrelated churn |
| Refactor | Move logic across 2-4 files | Preserves behavior and follows local style |
| Long task | Run a multi-step cleanup in your coding tool | Maintains context and validates with repo commands |
| Review | Review another model’s patch | Concrete, file-grounded issues instead of generic warnings |
If GLM-5.2 passes these tasks, make it the budget lane for routine work and keep Claude Opus 4.8, GPT-5.5, or another premium model for high-risk migrations, final arbitration, or compliance-sensitive review.
Related links
- /compare/pi-vs-zcode-vs-opencode/ - Same-model harness selection and test card
- /tools/zai/ - Z.AI Coding Plan setup, quota caveats, and referral disclosure
- /models/glm-5.1/ - GLM-5.1 prior-release context
- /models/claude-opus-4-8/ - premium Claude baseline for comparison math
- /models/kimi-k3/ - Kimi’s newest flagship and 1M-context eval lane
- /models/kimi-k2.7-code/ - cheaper Kimi coding API lane
- /compare/models/glm-5.2-vs-kimi-k2.6/ - Z.AI vs Kimi coding-model comparison
- /value/smart-spend/ - Low-cost upgrade strategy
- /compare/models/mid-range/ - Production spend-band comparison
Sources
- Z.AI GLM-5.2 docs (Archive)
- Z.AI pricing (Archive)
- Artificial Analysis GLM-5.2 article (Archive)
- Artificial Analysis Intelligence Index v4.1 methodology
- Claude API pricing
- Z.AI GLM Coding Plan overview (Archive)
- Z.AI supported tool integration (Archive)
- Kimi K2.7 Code docs
- Kimi K2.7 Code pricing
Last verified: July 2, 2026. Pricing, context limits, supported tools, quota multipliers, Artificial Analysis scores, and invite terms can change quickly.