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. OmniaKey currently charges 50% of those rates.
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. OmniaKey currently lists the same model at $0.70 input, $0.13 cached input, and $2.20 output per million tokens.
That makes the arithmetic simple, but not every request costs half of the headline input price. A request can contain uncached input, cached input, and generated output, and each part uses a different rate.
Prices verified August 9, 2026. The Z.ai column below comes from Z.ai's international developer pricing page. The OmniaKey column is the current platform rate, not a new official Z.ai list price. Rates and promotions can change, so check both live pages before committing a production budget.
GLM-5.3 launch update: Z.ai released GLM-5.3 to Coding Plan users on August 14, but its developer API page still says the API is coming soon and the official pricing table has no 5.3 row. Use the GLM-5.3 vs GLM-5.2 coding comparison for the upgrade decision; the rates 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 | OmniaKey current rate | Current difference |
|---|---|---|---|
| Uncached input | $1.40 | $0.70 | 50% lower |
| Cached input | $0.26 | $0.13 | 50% lower |
| Output | $4.40 | $2.20 | 50% lower |
The live GLM-5.2 model page shows the current OmniaKey rate, context window, capabilities, and request example. Use the model catalog when comparing it with other available models.
The general cost equation is:
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 the official rate or $0.70 at the current OmniaKey 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; OmniaKey lists $0.13.
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; the current OmniaKey rate is $2.20. 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 boundary 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 | OmniaKey current |
|---|---|---|
| Input | 1 × $1.40 = $1.40 | 1 × $0.70 = $0.70 |
| Output | 0.1 × $4.40 = $0.44 | 0.1 × $2.20 = $0.22 |
| Total | $1.84 | $0.92 |
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
OmniaKey: 10 × $0.70 + 2 × $2.20 = $11.40
This is a workload total, 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
OmniaKey: 10 × $0.13 + 1 × $2.20 = $3.50
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.
Why the OmniaKey price differs from Z.ai list price
Z.ai publishes the upstream international API list rates. OmniaKey publishes the price charged through its own prepaid gateway. As of the verification date, OmniaKey applies a 0.5 price ratio to GLM-5.2 across uncached input, cached input, and output.
The two columns describe different billing relationships:
- use Z.ai's column when budgeting a direct Z.ai API account;
- use OmniaKey's column when the request is billed against an OmniaKey balance;
- do not combine one platform's input rate with another platform's output rate;
- do not assume the current 50% difference is permanent.
OmniaKey does not change the requested model id to create this price difference. The request still names glm-5.2; unavailable requests fail rather than silently switching to another model.
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 route 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 this article does 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 routing 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 acceptance test 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 acceptance criteria 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.2 through OmniaKey
Create a scoped key in the API Keys dashboard, then use the OpenAI-compatible chat-completions route:
curl https://api.omniakey.com/v1/chat/completions \
-H "Authorization: Bearer $OMNIAKEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "Review this migration plan"}],
"stream": true
}'
Use the exact model id glm-5.2. 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 workload 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.
Treating today's discount as a permanent contract
The 50% OmniaKey ratio is current as of August 9, 2026. Recheck the live catalog before publishing a budget or procurement decision.
Calling a lower rate a benchmark win
Price measures billing, not correctness, latency, tool reliability, or task completion. Test the actual workload.
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. OmniaKey currently lists $0.70, $0.13, and $2.20 respectively.
Is GLM-5.2 cheaper through OmniaKey?
At the August 9, 2026 verification date, yes: the listed OmniaKey rates are 50% of Z.ai's international list rates. That is a current platform price, not a permanent Z.ai price change.
How much does a one-million-token GLM-5.2 prompt cost?
One million uncached input tokens cost $1.40 at Z.ai list price or $0.70 at the current OmniaKey rate, before output. If the full million is reported as cached input, the respective read charges are $0.26 and $0.13.
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 route expose before production use.
Sources
- Z.ai: API pricing
- Z.ai: GLM-5.2 model overview
- Z.ai: chat-completions API
- OmniaKey GLM-5.2 model page
- OmniaKey balance and usage documentation
Fact-checked August 9, 2026. Provider rates, platform discounts, cache terms, and supported features can change. Verify the linked first-party documentation and live OmniaKey catalog before committing a production budget.