GLM 5.2 Pricing: API Rates, Subscription Plans, and Self-Host Cost
What GLM 5.2 actually costs — Zhipu AI's official per-token API rate, the flat-rate Coding Plan, third-party resellers, and the real price of running it yourself.
GLM 5.2 has three separate price tags, and which one applies depends on how you access it: Zhipu AI's official pay-per-token API, the flat-rate GLM Coding Plan subscription for use inside coding agents, or self-hosting the open weights on your own GPUs.
This guide covers the published rate for each path, third-party providers that resell API access at different rates, and a straight cost comparison against Claude Opus 4.8 and Kimi K3 so you can budget against a real number instead of a vendor's marketing page.
GLM 5.2 API Pricing: Z.AI's Official Per-Token Rate
Z.AI's official pay-per-token API prices GLM 5.2 at $1.40 per million input tokens and $4.40 per million output tokens. Cached input — context you have already sent in a prior turn — costs $0.26 per million tokens, roughly a fifth of the standard input rate.
Z.AI also charges $0.01 per call for the built-in web-search tool, on top of the token cost for that request. There is no separate charge for the 1-million-token context window itself — you simply pay for the tokens you actually send and receive.
These figures come from Z.AI's own published rate card as reflected on OpenRouter's model listing and cross-checked against independent pricing trackers. Z.AI has adjusted GLM pricing before via promotions, so verify the current number on Z.AI's own site before you commit a production budget to it.
- Input tokens: $1.40 per million
- Cached input tokens: $0.26 per million (about 1/5 the standard input rate)
- Output tokens: $4.40 per million
- Web search tool: $0.01 per call, plus token cost
Weighing GLM 5.2's API against the Coding Plan or self-hosting for your own coding volume? We model the real cost against your workload, not a rate card.
Book a ConsultationThe GLM Coding Plan: Flat-Rate Access Inside Coding Agents
If you work mainly inside an agentic coding client — Claude Code, Cline, OpenCode — Z.AI also sells the GLM Coding Plan, a flat-rate subscription metered by prompts instead of tokens. The entry Lite tier is confirmed at $18 per month per Z.AI's own documentation; Pro and Max sit above it but their exact current price should be checked on Z.AI's live pricing page, since Z.AI has run promotional pricing and adjusted tiers more than once.
The Coding Plan and the pay-per-token API are separate products — a heavy long-context request costs the same one prompt as a short one under the Coding Plan, which changes the math if your workload leans on GLM 5.2's full 1-million-token window.
For the full tier breakdown (prompt limits, included tools, and how it stacks up against Claude Code and Cursor Pro), see our dedicated GLM Coding Plan guide.
- Lite: $18/month (confirmed on Z.AI docs)
- Pro and Max: priced above Lite — verify current rate on Z.AI's subscribe page
- Metered by prompts on a 5-hour and weekly cadence, not by token count
- Separate product from the pay-per-token API — pick one path per workload, not both by default
Third-Party GLM 5.2 Pricing: OpenRouter and Other Resellers
GLM 5.2 is also available through third-party API aggregators such as OpenRouter and Together AI, which host the model and set their own rates rather than passing Z.AI's price through unchanged.
OpenRouter's own listing shows input pricing as low as $0.75 per million tokens from some upstream providers on its platform — noticeably below Z.AI's direct $1.40 rate — though the specific provider and price shift over time as aggregators renegotiate hosting deals. Compare the current per-provider rate on OpenRouter's own page before routing production traffic through a reseller instead of Z.AI directly.
- Third-party input rates have been seen as low as $0.75/million tokens on OpenRouter, below Z.AI's direct $1.40 rate
- Rates vary by upstream provider and change without notice — check the live listing, not a cached price
- A reseller adds a layer between you and Z.AI — factor in uptime and support tradeoffs, not just price
Self-Hosting GLM 5.2: Zero Token Cost, Real Hardware Cost
Because GLM 5.2 ships under an MIT license with open weights, you can download it from Hugging Face and run it on your own infrastructure at zero per-token cost. What replaces the token bill is hardware: a practical minimum deployment is roughly 8x H200 GPUs, an investment of around $300,000, plus ongoing power and operations cost.
That math only pencils out at real scale. Self-hosting makes sense once you are processing on the order of 1 billion or more tokens a month, or when a compliance requirement — data that legally cannot leave your infrastructure — outweighs the up-front hardware cost.
Below that volume, the API (direct or third-party) is cheaper once you account for the GPU purchase, depreciation, and the engineering time to run a production inference stack.
- Token cost once self-hosted: $0
- Practical minimum hardware: ~8x H200 GPUs, roughly $300,000 up front
- Breakeven point: roughly 1B+ tokens/month, or a hard compliance requirement to keep data on-premises
- Below that volume, API access (direct or third-party) is cheaper once GPU cost and ops time are counted
GLM 5.2 Cost vs Claude Opus 4.8 and Kimi K3
GLM 5.2's $1.40/$4.40 per-million-token rate undercuts Claude Opus 4.8 by a wide margin on a straight per-token basis — Opus 4.8 is priced for frontier general reasoning, not high-volume coding throughput. Against Kimi K3's launch API pricing (roughly $0.30–$3 per million input tokens depending on cache hit, $15 per million output), GLM 5.2 is cheaper on input but more expensive on output tokens.
For a team generating a large volume of code and processing that volume mostly as input (long codebases, long documents) rather than long generated output, GLM 5.2's cached-input rate of $0.26/million is the standout number — repeatedly re-sending the same large context costs a fraction of a fresh request.
- GLM 5.2: $1.40 input / $0.26 cached input / $4.40 output per million tokens
- Kimi K3 (launch pricing): ~$0.30 cache-hit / $3 cache-miss input, $15 output per million tokens
- Claude Opus 4.8: priced for frontier general reasoning — materially higher per-token than either open-weight model
- GLM 5.2 wins on cached, repeat-context-heavy coding workloads; Kimi K3 undercuts it on raw input price at cache miss
What you need to run GLM-5.2 yourself
GLM-5.2 is a frontier-scale Mixture-of-Experts model, so "running it yourself" is a real infrastructure decision — not something a single laptop or gaming GPU can do. Match the path below to how seriously you need to self-host. For most teams the API or rented GPUs are the right answer; buying hardware only pays off at steady, high volume or when your data can never leave your walls.
| Path | What it is | Best for | Get started |
|---|---|---|---|
| Call the hosted API | Use GLM-5.2 as a pay-per-token API — zero hardware | Most teams; evaluating before committing | OpenRouter |
| Rent GPUs by the hour | Spin up H100 / A100 nodes on demand, tear them down after | Self-hosting without capital outlay; bursty workloads | RunPod |
| Local on unified memory | A single workstation with enough unified memory to hold a 4-bit quant | One powerful on-prem box; privacy-first solo/SMB use | Apple Mac Studio (M3 Ultra, 512GB) |
| Local on workstation GPUs | Multiple 48GB professional cards for MoE offload / tensor parallelism | Power users and small clusters that want cards they own | NVIDIA RTX 6000 Ada (48GB) |
Once GLM-5.2 is running, the fastest way to put it to work day to day is inside Cursor — point it at the model through OpenRouter as a custom model. And if you would rather run a model on one affordable box, see Best mini PCs for local AI and Local AI hardware calculator.

Frequently Asked Questions
- Z.AI's official API prices GLM 5.2 at $1.40 per million input tokens, $0.26 per million cached input tokens, and $4.40 per million output tokens. The GLM Coding Plan subscription starts at $18/month (Lite tier) for flat-rate access inside coding agents. Self-hosting removes the token cost but requires roughly 8x H200 GPUs (~$300,000).
- Yes, substantially, on a per-token API basis. GLM 5.2's $1.40/$4.40 per-million-token rate is well below Claude Opus 4.8's frontier pricing. The tradeoff is capability — Opus 4.8 leads on general reasoning, while GLM 5.2's advantage is long-horizon coding at lower cost.
- The model weights themselves are free to download and self-host under the MIT license — no royalty or licensing fee. The hosted Z.AI API and the GLM Coding Plan are both paid; there is no ongoing free hosted tier for production use.
- The entry Lite tier is confirmed at $18/month per Z.AI's own documentation. Pro and Max tiers sit above Lite; check Z.AI's live subscribe page for the current price, since Z.AI has adjusted these tiers via promotions. See our full GLM Coding Plan guide for the tier breakdown.
- For most teams, the API is cheaper. Self-hosting removes the per-token cost but requires roughly $300,000 in GPU hardware (about 8x H200s) plus operations. That investment only pays off at high volume — roughly 1 billion or more tokens per month — or when a compliance requirement forces data to stay on your own infrastructure.
Budgeting a GLM 5.2 Rollout?
Book a free 30-minute AI workflow audit with Layer3 Labs. We'll help you model the real cost of GLM 5.2 — API, Coding Plan, or self-hosted — against your actual token volume, not a vendor's headline rate.
Book Now