GLM-5 API pricing at a glance
Z.AI’s pricing page lists GLM-5 at $1.00 per 1 million input tokens and $3.20 per 1 million output tokens. It also lists cached input at $0.20 per 1 million tokens and marks cached-input storage as limited-time free. Prices on the page are in USD. These are Z.AI’s listed rates for its API—not a promise that every third-party route or subscription uses the same pricing. (Z.AI pricing)
| GLM-5 token type | Listed price |
|---|---|
| Input | $1.00 / 1M tokens |
| Cached input | $0.20 / 1M tokens |
| Output | $3.20 / 1M tokens |
Cached input is conditional: don’t assume all prompt tokens qualify for the cached rate. Confirm how caching is counted for your request and check the pricing page for the applicable terms. Z.AI lists cached-input storage as limited-time free, but does not give a duration in the captured rate table. (Z.AI pricing)
Estimate your GLM-5 API spend
For uncached usage, estimate token charges as:
(input tokens ÷ 1,000,000 × $1.00) + (output tokens ÷ 1,000,000 × $3.20)
For example, 1 million input tokens and 1 million output tokens cost $4.20 at the listed rates: $1.00 + $3.20. If you process 10 million input tokens and 2 million output tokens without cached input, the estimate is $16.40: $10.00 for input plus $6.40 for output. These are calculations from the listed token rates, not guaranteed invoices; your actual total depends on the route and applicable billing terms. (Z.AI pricing)
If a full 1 million input tokens qualify for the listed cached-input rate, then 1 million cached input tokens plus 1 million output tokens would calculate to $3.40: $0.20 + $3.20. Treat that as a conditional example, not an assumption that your prompts will be cached. (Z.AI pricing)
Check the API route before budgeting
The model name alone isn’t enough to identify a billable route. Z.AI’s standard API documentation gives the base URL as https://api.z.ai/api/paas/v4 and specifies Bearer authentication with a standard API key. The chat-completions endpoint is https://api.z.ai/api/paas/v4/chat/completions. Z.AI documents a separate endpoint for its Coding Plan, so confirm that your key and endpoint match the product you intend to use. (Z.AI API introduction)
A minimal request pattern, combining the documented standard endpoint and authentication format with the GLM-5 model name, is:
curl --request POST \\
--url https://api.z.ai/api/paas/v4/chat/completions \\
--header 'Authorization: Bearer YOUR_ZAI_API_KEY' \\
--header 'Content-Type: application/json' \\
--data '{
"model": "glm-5",
"messages": [
{"role": "user", "content": "Summarize this text in three bullet points."}
]
}'
Keep the API key out of source code and client-side applications. For a real budget, use your expected monthly input and output token volumes, check whether some input is billed as cached, and confirm the active rates and billing terms for your account and route.
Check whether GLM-5 fits the production workload
Z.AI’s model documentation lists a 200K-token context length and 128K maximum output for GLM-5. It describes text input and features including tool/function calling, structured output, streaming, thinking modes, and context caching. These are provider-documented capabilities and limits; test your own prompts, tools, latency needs, and failure handling before basing a production decision on them. (GLM-5 documentation)
The price answer above is specifically for GLM-5, not GLM-5.1, GLM-5.2, or another model variant. Check the exact model ID and version when setting up the API and estimating spend; do not transfer one model’s price or limits to another. (Z.AI pricing)
Sources
Pricing — Z.AI Developer Documentation
GLM-5 — Z.AI Developer Documentation
Introduction — Z.AI API Reference
