Z.AI provides an Anthropic-compatible endpoint, so Claude Code can call GLM-5.3 directly. You do not need Claude Code Router or another format-conversion service.
GLM-5.3 is Z.AI’s current flagship model for software engineering and longer agent tasks. It accepts text, has a 1-million-token context window, and can return up to 128,000 tokens. Reasoning is always enabled.
Install Claude Code and create a key
Install Claude Code using the Windows and WSL guide. Subscribe to a GLM Coding Plan or set up the API access you intend to use, then create a key in the Z.AI console.
The Coding Plan is restricted to supported coding tools. Do not treat its key or quota as general API credit for an application, bot, or shared service.
Configure Claude Code
Open ~/.claude/settings.json in WSL. On native Windows, open your user-level Claude settings file. Merge the following values into the existing env object:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"ANTHROPIC_AUTH_TOKEN": "YOUR_ZAI_API_KEY",
"ANTHROPIC_MODEL": "glm-5.3",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.3",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.3",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.3"
}
}
Keep any unrelated permissions, hooks, or environment settings already in the file. A missing comma or duplicate top-level key can prevent Claude Code from reading the configuration.
Start and verify
Open a new terminal so it does not retain older provider variables, then start Claude Code inside a project:
cd /path/to/project
claude
Run these commands inside Claude Code:
/status
/model
The status should show https://api.z.ai/api/anthropic, and the active model should be glm-5.3.
Pick a reasoning effort
GLM-5.3 reasoning effort
| low | Shorter reasoning for routine work |
|---|---|
| high | More reasoning for everyday development tasks |
| max | Deep reasoning for complex engineering work |
Z.AI recommends max for complex coding. A lower setting can reduce time and token use on straightforward edits. Claude Code or the provider may control this setting depending on the integration path.
Troubleshooting
If authentication fails, check that the key matches the service you purchased and that an older ANTHROPIC_AUTH_TOKEN is not overriding the settings file. If Claude Code still shows an Anthropic model, close every Claude Code process, open a new terminal, and check /status again.
An error about disabled thinking means an old configuration still sends thinking.type: "disabled". Change it to enabled and use reasoning_effort: "low" if you want the lightest supported reasoning mode.
Image input will fail because GLM-5.3 is text-only. Z.AI lists separate vision-language models, including GLM-5V-Turbo.
GLM-5.3 Claude Code check
- Create a Z.AI key for the intended service
- Set the Anthropic endpoint to https://api.z.ai/api/anthropic
- Use glm-5.3 as the model ID
- Remove any setting that disables thinking
- Confirm the endpoint and model with /status and /model
The old GLM-5 configuration is no longer the right default for a new installation. GLM-5.3 changes the context limit and reasoning behavior, so updating only the model name may not be enough when an older client explicitly disables thinking.
For plan details, see the GLM Coding Plan setup. For other clients, see GLM with OpenCode and GLM with Cline.