Agentic. LLM. Provider. Zai
(agentic v0.4.0)
Copy Markdown
z.ai (formerly Zhipu) Provider — OpenAI-compatible.
z.ai serves the GLM family. The wire format is OpenAI-compatible
(Authorization: Bearer <KEY>), so this provider reuses the OpenAI
Chat Completions transport with a different base URL.
Endpoints
- Global (USD billing):
https://api.z.ai/api/paas/v4/ - China (CNY billing):
https://open.bigmodel.cn/api/paas/v4/ - Coding-Plan keys:
https://api.z.ai/api/coding/paas/v4/(China coding:https://open.bigmodel.cn/api/coding/paas/v4/)
We default to the global pay-as-you-go endpoint. Coding-plan
subscribers must point at the coding endpoint by setting
ZAI_BASE_URL=https://api.z.ai/api/coding/paas/v4. On the coding plan
the GLM-5 family (glm-5.2, glm-5.1, glm-5-turbo, glm-5v-turbo) is
served under a flat subscription, so per-token costs there are zero.
z.ai exposes no /models endpoint and no balance/quota endpoint;
the model list is static and per-account quotas are dashboard-only at
https://z.ai/manage-apikey/billing.
Model pricing per 1M tokens (USD):
glm-4.5 $0.60 / $2.20 131k ctx
glm-4.5-air $0.13 / $0.85 131k
glm-4.5-flash $0.00 / $0.00 128k (free tier; rate-limited)
glm-4.6 $0.39 / $1.74 205k
glm-4.7 $0.38 / $1.74 203k
glm-4.7-flash $0.06 / $0.40 203k