Z.ai API Pricing, Models & Rate Limits (2026)
Z.ai (formerly Zhipu AI) trains the GLM family and serves its coding-first flagship, GLM-5.2, directly on open weights at a 1M-token context window — priced well below closed frontier models from the larger US labs.
Also known as: Zhipu AI, GLM.
Models and prices
| Model | Input /M | Output /M | Blended /M |
|---|---|---|---|
| GLM-5.2 | $1.40 | $4.40 | $2.15 |
1 legacy Z.ai model
| GLM-5.1 | $1.00/M blended |
Operational facts
Verified 2026-08-08 against source.
| OpenAI-compatible | Yes |
| API base URL | https://api.z.ai/api/paas/v4 |
| Auth model | Bearer API key |
| Prompt caching | Not documented |
| Batch discount | Not documented |
| Free tier | Free trial credits for new accounts |
| Rate-limit model | Per-model concurrency caps by account tier |
| Data residency | Not documented |
| Trains on API data | Not documented |
| SLA published | No |
Lifecycle
Z.ai has 1 legacy model still routable. Full dates and successors on the model deprecation tracker.
Switching to and from Z.ai
Calling Z.ai through All AI Ask
curl https://allaiask.com/api/v1/chat \
-H "Authorization: Bearer $ALLAIASK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "glm-5.2", "messages": [{"role": "user", "content": "Hello"}]}'FAQ
Is Z.ai OpenAI-compatible?
Yes — Z.ai's API base (https://api.z.ai/api/paas/v4) accepts the OpenAI SDK request/response shape, so existing OpenAI client code works with a base-URL and key swap.
Does Z.ai support prompt caching?
Not documented as of 2026-08-08 — we did not find a published prompt-caching feature for Z.ai. If that changes, this page updates.
Does Z.ai have a free tier?
Yes — Free trial credits for new accounts.
How much does the Z.ai API cost?
Current Z.ai models range from $2.15 to $2.15 per million blended tokens (3:1 input:output). Full per-model pricing is in the table below.
Where is Z.ai API data hosted?
Not documented as of 2026-08-08 — no published data-residency commitment found for Z.ai.
