Z.AI’s Coding Plan can power Claude Code through an Anthropic-compatible endpoint. The current model is glm-5.3. Older setup guides that select GLM-5.1 or GLM-5-Turbo should be migrated.
What the plan covers
The subscription uses a points quota instead of an unlimited request allowance. The number of points used depends on the model and traffic period. Z.AI currently applies a half-points rate during its published off-peak window, so read the live plan page before choosing a tier.
Current setup values
| Model | glm-5.3 |
|---|---|
| Protocol | Anthropic-compatible |
| Base URL | https://api.z.ai/api/anthropic |
| Input | Text |
| Context | Up to 1 million tokens |
Configure Claude Code
In a Linux or WSL shell, set the variables for the current session:
export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="your-zai-plan-key"
export ANTHROPIC_MODEL="glm-5.3"
claude
In PowerShell, use the equivalent $env:NAME = "value" form. Store the key in a secure user-level secret or shell configuration that is excluded from source control.
Control usage
Use low reasoning effort for routine edits when the client supports it. Move to high or max for difficult debugging. GLM-5.3 always reasons, so effort changes the amount of work rather than turning reasoning off.
Keep an eye on the points balance when Claude Code runs long agent loops. A plan makes billing predictable, but unattended retries can still exhaust its quota.
Troubleshooting
- A 401 response usually means the key is missing or invalid.
- A 404 or format error usually means the wrong protocol endpoint was copied.
- A model error usually means an older or misspelled ID is configured. Use
glm-5.3. - An image task will not work as expected because GLM-5.3 accepts text input.
GLM Coding Plan checklist
- Coding Plan activated and key created
- Anthropic-compatible endpoint configured
- Model set to glm-5.3
- Key kept outside the repository
- Points usage checked after a test task
For a fuller Windows walkthrough, see GLM-5.3 with Claude Code. For editor use, see GLM-5.3 with Cline.