← All providers

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.

Current models
1
Legacy models
1
Price range /M
$2.15–$2.15
Max context
1M
Median tok/s
Next retirement

Models and prices

ModelInput /MOutput /MBlended /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-compatibleYes
API base URLhttps://api.z.ai/api/paas/v4
Auth modelBearer API key
Prompt cachingNot documented
Batch discountNot documented
Free tierFree trial credits for new accounts
Rate-limit modelPer-model concurrency caps by account tier
Data residencyNot documented
Trains on API dataNot documented
SLA publishedNo
DocsOfficial pricing

Lifecycle

Z.ai has 1 legacy model still routable. Full dates and successors on the model deprecation tracker.

Switching to and from Z.ai

The closest-priced current model to GLM-5.2 ($2.15/M) outside Z.ai is Claude Haiku 4.5 ($2.00/M, -7%). Same request shape through All AI Ask — swap the model id, keep the rest of your code.

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.

Try Z.ai for free

Run real prompts against every current Z.ai model, and every other provider on this site, in one workspace.

Try It Free