# GLM-5.2 API Pricing

> GLM-5.2 API pricing explained with official input, output, and cached-input rates, current OmniaKey prices, reproducible cost examples, and budgeting caveats.

- Canonical HTML: https://omniakey.com/blog/glm-5-2-api-pricing
- Markdown: https://omniakey.com/blog/glm-5-2-api-pricing.md
- Published: 2026-08-09 (updated 2026-10-30)
- Author: Kiki, COO at OmniaKey
- Language: en
- Category: Cost control
- Reading time: 10 min
- All posts: https://omniakey.com/blog/llms.txt

---

Updated October 30, 2026: OmniaKey no longer lists GLM-5.2 and now offers [GLM-5.3](https://omniakey.com/glm-5-3) instead; for the upgrade decision see [GLM-5.3 vs GLM-5.2 for coding](https://omniakey.com/blog/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](https://omniakey.com/glm-5-3) 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](https://omniakey.com/blog/glm-5-3-vs-glm-5-2-for-coding) 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](https://omniakey.com/glm-5-3) shows the current OmniaKey price, context window, capabilities, and request example. Use the [model catalog](https://omniakey.com/models) when comparing it with other available models.

The general cost equation is:

```text
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.

```text
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.

```text
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](https://omniakey.com/blog/transparent-billing).

## 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](https://omniakey.com/blog/best-llm-coding-agents) 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:

1. uncached, cached, and output tokens;
2. the number of model turns and tool calls;
3. latency and failed attempts;
4. human correction time;
5. whether the required tests and your checks passed;
6. 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](https://omniakey.com/glm-5-3) replaced it. Create a scoped key in the [API Keys dashboard](https://omniakey.com/dashboard/tokens), then use the OpenAI-compatible chat-completions endpoint:

```bash
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](https://docs.omniakey.com/en/quick-start) documents the endpoint and authentication pattern.

After a representative task, compare the client-side token report with the [usage dashboard](https://omniakey.com/dashboard). The [balance and usage guide](https://docs.omniakey.com/en/api/balance-usage) 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:

1. run one representative task;
2. inspect actual uncached, cached, and output usage;
3. remove avoidable context and retries;
4. set a key cap above normal task variance;
5. review usage before increasing the cap.

For context-level optimization, use the [token-usage reduction guide](https://omniakey.com/blog/reduce-claude-code-token-usage). 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](https://omniakey.com/glm-5-3) 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](https://docs.z.ai/guides/overview/pricing)
- [Z.ai: GLM-5.2 model overview](https://docs.z.ai/guides/llm/glm-5.2)
- [Z.ai: chat-completions API](https://docs.z.ai/api-reference/llm/chat-completion)
- [OmniaKey GLM-5.3 model page](https://omniakey.com/glm-5-3)
- [OmniaKey balance and usage documentation](https://docs.omniakey.com/en/api/balance-usage)

_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._
