GLM-5.2 API Pricing
Z.ai lists GLM-5.2 at $1.40 input, $0.26 cached input, and $4.40 output per million tokens.
On this page
- GLM-5.2 API pricing at a glance
- What each GLM-5.2 price means
- Uncached input
- Cached input
- Cached-input storage
- Output
- Three reproducible cost examples
- Example 1: one large repository read
- Example 2: a long engineering workload
- Example 3: repeated cached context
- What GLM-5.2 provides for that price
- When GLM-5.2 can make economic sense
- Measure cost per accepted task
- Call GLM-5.3 through OmniaKey
- Control the budget without confusing caps with savings
- Common pricing mistakes
- Treating 1M context as free allowance
- Confusing cached-input reads with storage
- Pricing every repeated prompt as cached
- Comparing price without output volume
- Calling a lower rate a benchmark win
- Frequently asked questions
- How much does the GLM-5.2 API cost?
- Is GLM-5.2 cheaper through OmniaKey?
- How much does a one-million-token GLM-5.2 prompt cost?
- Does GLM-5.2 have a 1M context window?
- Does GLM-5.2 support tool calling and structured output?
- Sources
Updated October 30, 2026: OmniaKey no longer lists GLM-5.2 and now offers GLM-5.3 instead; for the upgrade decision see GLM-5.3 vs GLM-5.2 for coding.
Official GLM-5.2 API pricing is $1.40 per million input tokens, $0.26 per million cached-input tokens, and $4.40 per million output tokens. The GLM-5.3 model page shows the current OmniaKey price.
A request can contain uncached input, cached input, and generated output, and each part uses a different rate.
Prices verified September 18, 2026. The rates below come from Z.ai's international developer pricing page. Rates and promotions can change, so check the live page before committing a production budget.
GLM-5.3 update: Z.ai now documents GLM-5.3 API access and lists it at the same $1.40 input, $0.26 cached-input, and $4.40 output rates as GLM-5.2. Use the GLM-5.3 vs GLM-5.2 coding comparison for the upgrade decision; the calculations below remain specific to GLM-5.2.
GLM-5.2 API pricing at a glance
All values below are USD per one million tokens.
| Usage type | Z.ai official rate |
|---|---|
| Uncached input | $1.40 |
| Cached input | $0.26 |
| Output | $4.40 |
The live GLM-5.3 model page shows the current OmniaKey price, context window, capabilities, and request example. Use the model catalog when comparing it with other available models.
The general cost equation is:
cost = uncached_input_millions × input_rate
+ cached_input_millions × cached_input_rate
+ output_millions × output_rate
Token counts are measured by the billing system, not by character count or file size. A million characters is not necessarily a million tokens.
What each GLM-5.2 price means
Uncached input
Uncached input includes prompt content that does not qualify for a cache hit: instructions, conversation history, files, tool definitions, and other request context. Sending one million uncached input tokens costs $1.40 at Z.ai's official rate, before any output is generated.
Cached input
Cached input is eligible repeated context served at the lower read rate. Z.ai currently lists $0.26 per million cached-input tokens.
A cached-input price is not a promise that every repeated token will hit cache. Cache eligibility, request structure, expiry, and provider behavior still matter. Check actual usage records instead of estimating every repeated prompt at the cached rate.
Cached-input storage
Z.ai's pricing table separately lists cached-input storage as “Limited-time Free.” That is not the same line item as the $0.26 cached-input read rate. The duration and terms of a limited-time storage promotion can change independently, so do not treat storage as permanently free.
Output
Output includes generated reasoning and response tokens reported for billing. At official rates, one million output tokens cost $4.40. Output is therefore the most expensive line item in the table.
Long answers, verbose tool loops, repeated corrections, and high output limits can matter more than a modest change in prompt size. Set the response limit according to the task rather than automatically requesting the maximum.
Three reproducible cost examples
These examples apply the published rates directly. They exclude separate tool charges, taxes, currency conversion, and any future price change.
Example 1: one large repository read
Assume a task uses one million uncached input tokens and produces 100,000 output tokens.
| Calculation | Z.ai official |
|---|---|
| Input | 1 × $1.40 = $1.40 |
| Output | 0.1 × $4.40 = $0.44 |
| Total | $1.84 |
The one-million-token context window is capacity, not included usage. Filling it with uncached input creates an input charge even if the model returns only a short answer.
Example 2: a long engineering workload
Assume several calls together use ten million uncached input tokens and two million output tokens.
Z.ai: 10 × $1.40 + 2 × $4.40 = $22.80
This is a total for your tasks, not a benchmark estimate. The actual number of tokens needed to finish a task depends on the client, prompt, repository, tools, retries, and model behavior.
Example 3: repeated cached context
Assume ten million tokens are billed as cached input and the model produces one million output tokens.
Z.ai: 10 × $0.26 + 1 × $4.40 = $7.00
This example is valid only when the provider reports those ten million tokens as cache hits. A visually identical prompt does not guarantee identical billing treatment.
For the broader accounting standard, read how transparent API billing should work.
What GLM-5.2 provides for that price
Z.ai positions GLM-5.2 as its flagship model for long-horizon tasks. Its official model page lists:
- a 1-million-token context window;
- up to 128,000 output tokens;
- thinking modes and configurable reasoning effort;
- streaming responses;
- function calling and MCP integration;
- structured output;
- context caching.
These are capacity and interface facts, not a guarantee that every client exposes every option. A gateway-compatible API endpoint is also not the same thing as native support inside every coding product.
Do not infer a universal quality winner from the price table. Z.ai publishes benchmark and product claims on its model page, but we did not independently reproduce those benchmarks.
When GLM-5.2 can make economic sense
GLM-5.2 is a reasonable candidate when the task needs:
- project-scale context across code, tests, documentation, and constraints;
- long multi-step implementation or refactoring;
- structured tool calls and machine-readable output;
- repeated context that can qualify for cached-input billing;
- a high output ceiling for large generated artifacts.
It may be a poor economic fit for a tiny classification, a short extraction, or a mechanical edit that a smaller model can complete reliably. The cheapest successful model for a task class matters more than the lowest percentage shown on a pricing page.
The coding-model selection guide explains why model choice should be based on accepted work rather than one headline rate.
Measure cost per accepted task
To evaluate GLM-5.2 against another model, hold the repository state, prompt, tools, permissions, and your own tests constant. Record:
- uncached, cached, and output tokens;
- the number of model turns and tool calls;
- latency and failed attempts;
- human correction time;
- whether the required tests and your checks passed;
- final billed cost.
A model with a lower token rate can still cost more if it creates extra retries. A higher-rate model can be economical when it completes difficult work in fewer attempts. Repeat each task because agent results vary.
Call GLM-5.3 through OmniaKey
OmniaKey no longer lists GLM-5.2, and the GLM-5.3 model page replaced it. Create a scoped key in the API Keys dashboard, then use the OpenAI-compatible chat-completions endpoint:
curl https://api.omniakey.com/v1/chat/completions \
-H "Authorization: Bearer $OMNIAKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [{"role": "user", "content": "Review this migration plan"}],
"stream": true
}'
Use the exact model id glm-5.3. The API quick start documents the endpoint and authentication pattern.
After a representative task, compare the client-side token report with the usage dashboard. The balance and usage guide explains per-call records and key caps.
Control the budget without confusing caps with savings
A key spending cap limits financial exposure; it does not reduce token consumption below the cap. Use separate keys for local work, CI, and shared automation so each of them has independent attribution and revocation.
A practical sequence is:
- run one representative task;
- inspect actual uncached, cached, and output usage;
- remove avoidable context and retries;
- set a key cap above normal task variance;
- review usage before increasing the cap.
For context-level optimization, use the token-usage reduction guide. Its principles apply beyond Claude Code even though the commands in that article are client-specific.
Common pricing mistakes
Treating 1M context as free allowance
The context window is a maximum capacity. Input placed into it is still metered according to its billing classification.
Confusing cached-input reads with storage
Z.ai lists a per-token cache-hit price and a separate limited-time storage promotion. They are not interchangeable.
Pricing every repeated prompt as cached
Only provider-reported cache hits qualify. Confirm the usage line item.
Comparing price without output volume
Output costs more per token than input. A workflow that generates excessive reasoning or repeated patches can erase prompt-side savings.
Calling a lower rate a benchmark win
Price measures billing, not correctness, latency, tool reliability, or task completion. Test the actual tasks.
Frequently asked questions
How much does the GLM-5.2 API cost?
Z.ai lists $1.40 per million uncached input tokens, $0.26 per million cached-input tokens, and $4.40 per million output tokens.
Is GLM-5.2 cheaper through OmniaKey?
OmniaKey no longer lists GLM-5.2, so there is no OmniaKey rate for it. The GLM-5.3 model page shows the current OmniaKey price.
How much does a one-million-token GLM-5.2 prompt cost?
One million uncached input tokens cost $1.40 at Z.ai's list price, before output. If the full million is reported as cached input, the read charge is $0.26.
Does GLM-5.2 have a 1M context window?
Yes. Z.ai lists a one-million-token context window and a 128,000-token maximum output. Capacity does not mean the full window is free or always necessary.
Does GLM-5.2 support tool calling and structured output?
Z.ai's model page lists function calling, MCP, structured output, streaming, thinking modes, and context caching. Verify which features the exact client and API endpoint expose before production use.
Sources
- Z.ai: API pricing
- Z.ai: GLM-5.2 model overview
- Z.ai: chat-completions API
- OmniaKey GLM-5.3 model page
- OmniaKey balance and usage documentation
Fact-checked August 9, 2026. Provider rates, cache terms, and supported features can change. Verify the linked first-party documentation and live OmniaKey catalog before committing a production budget.
Related articles
GLM-5.5 Release Date: Not Announced Yet, What to Use Now
Z.ai has never named GLM-5.5. Here is where the talk started, what can be checked, and which GLM model to call today.
Gemini 3.8 Flash API Pricing and Agent Cost
Google's introductory rate is $0.75 input and $3.75 output per million tokens, but retries and thinking decide the cost of an accepted result.
GLM-5.3-FlashX Review
FlashX sells lower waiting time, not a proven new intelligence tier, so its roughly 2.5x premium belongs only on latency-sensitive paths.