Z.ai GLM Coding Plan
subscription
Getting credentials
plan-key
api_key via header (header Authorization: Bearer)
Environment: ZAI_CODING_PLAN_API_KEY
Subscribe at z.ai/subscribe; plan keys are distinct from normal API keys and only work on coding-plan endpoints.
Endpoints
| ID | URL | Protocol | Auth |
|---|---|---|---|
| coding-chat-completions | https://api.z.ai/api/coding/paas/v4/chat/completions | openai-chat | any |
| coding-anthropic | https://api.z.ai/api/anthropic | anthropic-messages | any |
| coding-responses | https://api.z.ai/api/v1 | openai-responses | any |
API surfaces
textstreaming
Plan
- Price
- $18 / monthly
- Quota
- Lite ~2000 credits/5h, 10000/week; Pro ~12000/5h; Max ~28000/5h
- Notes
- Credits-based since 2026-07-30. Includes GLM-5.3, GLM-5-Turbo, GLM-4.7; GLM-5.2/5.1 auto-route to GLM-5.3.
- Docs
- https://docs.z.ai/devpack/overview
Quirks
- Preserved Thinking is enabled by default on coding-plan endpoints (opposite of the standard API). For Claude Code: ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic, ANTHROPIC_AUTH_TOKEN=<plan key>. (docs)
Models offered
| Model | Wire ID | Endpoint | Status | Reasoning |
|---|---|---|---|---|
| zai/glm-4-6 | glm-4.6 | coding-chat-completions | ga | toggle · default on · returns reasoning_content · round-trips reasoning_content |
| zai/glm-5-3 | glm-5.3 | coding-chat-completions | ga | always_on · default on · mandatory · returns reasoning_content · round-trips reasoning_content |