The Z.ai API is billed per token in US dollars across the GLM model family. Rates run from $0.07 per 1M input tokens on GLM-4.7-FlashX to $8.90 per 1M output tokens on GLM-4.5-X. The flagship GLM-5.3 costs $1.40 per 1M input tokens and $4.40 per 1M output tokens, with cached input priced at $0.26.
Our team at Cabina.AI tracks pricing for Z.ai directly, since we give developers access to GLM-5.3 alongside 55+ other models through one subscription – when a rate changes, we see it firsthand. By our observation, Z.ai revises its rate card more often than most Western labs do, so a price checked a few months ago is not a safe number to build a budget on today.
Z.ai API Pricing Table – All Models
Z.ai, the company formerly known as Zhipu AI, bills GLM models per 1 million tokens through its own developer platform at api.z.ai. The table below covers every text model Z.ai currently lists on its official pricing page, from the GLM-5.3 line down to the legacy GLM-4-32B-0414-128K. Z.ai api pricing splits cleanly between a paid tier and three models the company gives away at no charge, both shown below.
| Model | Input | Cached input | Output |
|---|---|---|---|
| GLM-5.3 | $1.40 | $0.26 | $4.40 |
| GLM-5.3-Flash | $0.15 | $0.03 | $0.50 |
| GLM-5.3-FlashX | $0.37 | $0.075 | $1.25 |
| GLM-5.3-FlashX-Legal | $0.37 | $0.075 | $1.25 |
| GLM-5.2 | $1.40 | $0.26 | $4.40 |
| GLM-5.1 | $1.40 | $0.26 | $4.40 |
| GLM-5 | $1.00 | $0.20 | $3.20 |
| GLM-4.7 | $0.60 | $0.11 | $2.20 |
| GLM-4.6 | $0.60 | $0.11 | $2.20 |
| GLM-4.7-FlashX | $0.07 | $0.01 | $0.40 |
| GLM-4.5 | $0.60 | $0.11 | $2.20 |
| GLM-4.5-X | $2.20 | $0.45 | $8.90 |
| GLM-4.5-Air | $0.20 | $0.03 | $1.10 |
| GLM-4.5-AirX | $1.10 | $0.22 | $4.50 |
| GLM-4-32B-0414-128K | $0.10 | – | $0.10 |
| GLM-4.7-Flash | Free | Free | Free |
| GLM-4.5-Flash | Free | Free | Free |
GLM-5.1 and GLM-5.2 share the exact same rate card as the newer GLM-5.3, at $1.40 input and $4.40 output per 1M tokens. We noticed that GLM-4.5-X, a model from the prior generation, actually carries a higher per-token rate on both ends than the current flagship GLM-5.3 – it’s easy to assume the newest model name is always the priciest, and here that assumption is wrong.
Z.ai also prices a separate line of vision models that accept images alongside text:
| Model | Input | Cached input | Output |
|---|---|---|---|
| GLM-4.6V | $0.30 | $0.05 | $0.90 |
| GLM-4.6V-FlashX | $0.04 | $0.004 | $0.40 |
| GLM-4.5V | $0.60 | $0.11 | $1.80 |
| GLM-OCR | $0.03 | – | $0.03 |
| GLM-4.6V-Flash | Free | Free | Free |
Beyond chat and vision, Z.ai prices several endpoints outside the per-token tables above. Image generation runs $0.015 per image on GLM-Image and $0.01 per image on CogView-4. Video generation with CogVideoX-3 costs $0.20 per video, and the ASR model GLM-ASR-2512 bills audio transcription at $0.03 per million tokens, which Z.ai estimates at roughly $0.0024 per minute of audio. The built-in web search tool, usable from within a chat completion call, adds $0.01 per search. None of these figures belong in a token-based budget built from the chat tables above; they need their own line item.
Z.ai Cost Calculator
Z.ai API Request Example
The example below sends one authenticated request to GLM-5.3 through the native Z.ai chat completions endpoint, pulled directly from the official API reference.
Estimate only. Standard first-party Z.ai pricing from the official platform, excluding cached input tokens, non-token-based media models such as GLM-Image and CogVideoX-3, and the separate GLM Coding Plan subscription. Z.ai does not publish a Batch API discount, so none is applied here.
curl --request POST \
--url https://api.z.ai/api/paas/v4/chat/completions \
--header 'Authorization: Bearer your-api-key-here' \
--header 'Content-Type: application/json' \
--data '{
"model": "glm-5.3",
"messages": [
{"role": "user", "content": "Summarize this in one sentence."}
],
"stream": false
}'
Z.ai also documents an OpenAI-compatible route for teams that already standardize on the OpenAI Python client:
from openai import OpenAI
client = OpenAI(
api_key="your-api-key-here",
base_url="https://api.z.ai/api/paas/v4/"
)
completion = client.chat.completions.create(
model="glm-5.3",
messages=[
{"role": "user", "content": "Summarize this in one sentence."}
]
)
print(completion.choices[0].message.content)
Swap the model field for any other model ID from the pricing table, such as glm-4.6 or glm-4.5-air, to call it with the same code.
Pricing Tiers for Z.ai, Explained
Z.ai api cost does not currently include a published Batch API discount the way OpenAI and Anthropic price batch requests. Every request bills at the standard per-model rate in the tables above regardless of how it is sent, and Z.ai does not publish a separate low-latency priority tier either.
GLM-4.7-Flash and GLM-4.5-Flash cost nothing to call, with every column in the price table reading zero. The vision model GLM-4.6V-Flash carries that same $0 rate, which makes this small free lineup a direct way to trial GLM output before committing budget to the paid tier.
GLM Coding Plan
Z.ai sells a separate subscription called the GLM Coding Plan, built for coding tools such as Claude Code, Codex, Cline, and OpenCode rather than for direct API calls. It is not a replacement for the per-token rates above; it is a flat-fee quota that only applies inside supported coding agents. The entry Lite tier starts at $18 per month, with higher Pro and Max tiers offering proportionally larger 5-hour and weekly usage credits. Every tier currently routes to GLM-5.3 and GLM-5.3-Flash, and bundles MCP tools for vision understanding, web search, web reading, and code search at no extra per-call charge. Readers searching for Z.ai code pricing should use this plan page, not the token table above, since the two products bill on entirely different models.
Z.ai Prompt Caching and Context Pricing
How much is a token in Z.ai once the model has already seen it? Cached input (reusing part of a previous prompt so the model does not reprocess it) is the main standing discount Z.ai documents. Across most chat models, a cached token costs about 15-20% of the fresh input rate, which works out to roughly an 80% discount. GLM-4.7-FlashX and the vision model GLM-4.6V-FlashX cache even deeper, at close to 85-90% off their own fresh input price.
Two models skip caching pricing entirely: GLM-4-32B-0414-128K and GLM-OCR list no cached-input rate on the official pricing page, so every token on those two bills at the full input price no matter how much of the prompt repeats.
Context window size varies sharply across the lineup. GLM-5.3 supports a 1 million-token context window with a 128K-token output cap, while the older GLM-4.6 tops out at 200K tokens of context. Z.ai does not publish a length-based pricing cliff the way some competitors do; the rate in the table applies at any prompt length the model accepts.
GLM models use their own tokenizer, so a block of English or Chinese text does not convert into the same token count it would on an OpenAI or Anthropic model. Function and tool-call definitions count toward the same billable input total as the rest of the prompt, with no separate line item documented for them.
GLM-5.3 vs GLM-4.5-Air vs GLM-4.7-Flash: Which Should You Use?
Z.ai models api pricing splits by capability tier rather than by release date alone. GLM-5.3 is the model to reach for on complex reasoning, long documents, and agent workflows that need the full 1M-token context window; at $1.40 input and $4.40 output per 1M tokens, it costs about seven times as much as GLM-4.5-Air on the input side.
GLM-4.5-Air is the better default for everyday chat, summarization, and drafting work that doesn’t need frontier-level reasoning on every call. In our experience evaluating GLM models at Cabina.AI, routing only the hardest requests in a pipeline to GLM-5.3 and leaving the rest on GLM-4.5-Air or one of the FlashX variants keeps a monthly bill predictable without giving up much quality on simple tasks.
GLM-4.7-Flash and GLM-4.5-Flash cost nothing, which makes them the right starting point for prototyping a prompt before committing to a paid model, though Z.ai does not publish service-level guarantees for the free tier the way it does for paid traffic.
Is the Z.ai API Free?
Partly. GLM-4.7-Flash prices at $0. GLM-4.5-Flash does too. The vision model GLM-4.6V-Flash also runs free, with no usage cap published on the pricing page itself. How much do Z.ai tokens cost once a project outgrows those three models? Every other model on the platform, including the flagship GLM-5.3, bills per token from the first request, consistent with how Z.ai api pricing per million tokens works across the rest of the lineup.
If you would rather sample GLM output without opening a Z.ai account at all, GLM-5.3 is also available on Cabina.AI under a single monthly subscription. DeepSeek and Qwen sit on the same plan, alongside more than 50 other models, which makes it a lower-commitment way to compare Chinese-origin model output before setting up a dedicated Z.ai developer account.
Z.ai API vs DeepSeek API Pricing
Z.ai api costs per model land close to DeepSeek on the low end and noticeably higher on the flagship end, which makes the two a natural budget comparison since both labs sell large open-weight-adjacent models at aggressive rates. We cover the full DeepSeek rate card, including its peak and off-peak swing, in a separate DeepSeek API Pricing guide.
| Z.ai (GLM) | DeepSeek | |
|---|---|---|
| Flagship model | GLM-5.3 | DeepSeek-V4-Pro |
| Flagship input / output (per 1M) | $1.40 / $4.40 | $0.66 / $1.98 off-peak, $1.32 / $3.96 peak |
| Cheapest paid model | GLM-4.7-FlashX | DeepSeek-V4-Flash |
| Cheapest input / output (per 1M) | $0.07 / $0.40 | $0.14 / $0.28 flat |
| Cached input discount | About 80-90% depending on model | About 97% (DeepSeek-V4-Pro cache vs fresh input) |
| Peak/off-peak pricing | No | Yes, roughly doubles during Beijing business hours |
| Free paid-quality model | Yes, GLM-4.7-Flash and GLM-4.5-Flash | No published free tier |
DeepSeek pricing moves on a clock, roughly doubling during Beijing business hours no matter which GLM model you set it against. Z.ai prices stay flat around the clock, so a Z.ai bill is easier to forecast even where its flagship rate sits above DeepSeek off-peak pricing. In our view, the bigger practical difference is that Z.ai actually gives away two full chat models at no cost, something DeepSeek does not currently offer.
Z.ai API Pricing FAQ
Partly. The free tier covers GLM-4.7-Flash and GLM-4.5-Flash, plus the vision model GLM-4.6V-Flash; all three price at $0. Every other GLM model, including the flagship GLM-5.3, bills per token from the first request.
Prices range from $0.07 per 1M input tokens on GLM-4.7-FlashX to $8.90 per 1M output tokens on GLM-4.5-X. The flagship GLM-5.3 costs $1.40 per 1M input tokens and $4.40 per 1M output tokens.
Among paid models, GLM-4.7-FlashX is cheapest at $0.07 input and $0.40 output per 1M tokens. GLM-4.5-X is the most expensive on both ends, at $2.20 input and $8.90 output per 1M tokens, which is higher than the current flagship GLM-5.3. GLM-4.7-Flash and GLM-4.5-Flash cost nothing at all.
Yes. Cached input tokens cost roughly 15-20% of the fresh input rate on most GLM models, close to an 80% discount. GLM-4.7-FlashX and GLM-4.6V-FlashX cache even deeper, near 85-90% off. GLM-4-32B-0414-128K and GLM-OCR do not list a cached-input rate at all.
GLM-5.3 is the newest flagship, priced at $1.40 per 1 million input tokens and $4.40 per 1 million output tokens, with a 1 million-token context window and a 128K-token output cap.
No. The GLM Coding Plan is a flat-fee subscription starting at $18 per month that only works inside supported coding tools such as Claude Code and Codex. The per-token rates in this guide apply to direct API calls through api.z.ai and are billed separately.
Z.ai prices stay flat at any hour, while DeepSeek pricing on the same type of model roughly doubles during Beijing business hours. GLM-5.3 costs more than DeepSeek off-peak pricing on both input and output tokens, and Z.ai additionally offers two fully free paid-quality chat models that DeepSeek does not.