How to use GLM-5.3 with Claude Code
Set your I Code Easy API Key, the root URL https://api.icodeeasy.cc, and model glm-5.3 in Claude Code to use GLM-5.3 through this service. This guide covers macOS, Linux, Windows, verification, and common errors.
Model and client are different
GLM-5.3 is the model; Claude Code is Anthropic’s coding client. Running Claude Code does not mean a Claude model must handle the request: this configuration selects GLM-5.3. Use an I Code Easy Key and URL here, rather than a Zhipu Key, Coding Plan subscription, or official Zhipu endpoint.
Before you start
- If the client is not installed, follow the Claude Code installation guide first, then return here. Follow Anthropic’s current instructions for Windows terminals and Git Bash requirements.
- Register and copy your service Key from API Keys. Select an applicable endpoint as described in Getting started.
- Check current prices on the pricing page and supported features in the model capability catalog. Official Coding Plan prices and quotas do not describe this service.
- Keep the Key in your local configuration. Do not put it in a repository, screenshot, chat, or support ticket.
Configuration reference
| Variable | Value / purpose |
|---|---|
ANTHROPIC_AUTH_TOKEN | Your I Code Easy API Key |
ANTHROPIC_BASE_URL | https://api.icodeeasy.cc, a root URL without /v1 |
ANTHROPIC_MODEL | glm-5.3, the model for the current session |
ANTHROPIC_DEFAULT_HAIKU_MODEL | glm-5.3, mapping for the Haiku alias |
ANTHROPIC_DEFAULT_SONNET_MODEL | glm-5.3, mapping for the Sonnet alias |
ANTHROPIC_DEFAULT_OPUS_MODEL | glm-5.3, mapping for the Opus alias |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | 1, disables nonessential traffic |
The three default model variables keep Claude Code’s Haiku, Sonnet, and Opus aliases pointed at GLM-5.3. They do not turn GLM into a Claude model. The older ANTHROPIC_SMALL_FAST_MODEL variable is omitted from the recommended template; use the three default model variables above.
Linux / MacOS
Paste this configuration into the terminal where you will run Claude Code. Replace the placeholder with your service Key. These values initially apply to the current terminal session:
export ANTHROPIC_AUTH_TOKEN="your I Code Easy API Key"
export ANTHROPIC_BASE_URL="https://api.icodeeasy.cc"
export ANTHROPIC_MODEL="glm-5.3"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="glm-5.3"
export ANTHROPIC_DEFAULT_SONNET_MODEL="glm-5.3"
export ANTHROPIC_DEFAULT_OPUS_MODEL="glm-5.3"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
To persist the settings, add the same export lines to your shell’s startup file: ~/.zshrc for zsh or ~/.bashrc for bash. Run only the line that matches your shell:
source ~/.zshrc
source ~/.bashrc
You can also open a new terminal. An existing Claude Code process will not pick up changed environment variables; exit it and launch it again from the configured terminal.
Windows
To configure only the current PowerShell session, run:
$env:ANTHROPIC_AUTH_TOKEN = "your I Code Easy API Key"
$env:ANTHROPIC_BASE_URL = "https://api.icodeeasy.cc"
$env:ANTHROPIC_MODEL = "glm-5.3"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = "glm-5.3"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL = "glm-5.3"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL = "glm-5.3"
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
For persistence at user level, run this code in the same window after setting the variables above. It saves those seven values to your user environment:
$names = @(
"ANTHROPIC_AUTH_TOKEN",
"ANTHROPIC_BASE_URL",
"ANTHROPIC_MODEL",
"ANTHROPIC_DEFAULT_HAIKU_MODEL",
"ANTHROPIC_DEFAULT_SONNET_MODEL",
"ANTHROPIC_DEFAULT_OPUS_MODEL",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC"
)
foreach ($name in $names) {
$value = [Environment]::GetEnvironmentVariable($name, "Process")
[Environment]::SetEnvironmentVariable($name, $value, "User")
}
User environment values are read by processes launched later. Open a new PowerShell window after saving. If you use VS Code or another integrated terminal, restart its host application too, then launch Claude Code.
Verify locally, then send a real request
First confirm the client is installed. This command prints its version without making a model request:
claude --version
Check whether the Key exists using a boolean result; do not print the Key itself:
macOS / Linux:
test -n "$ANTHROPIC_AUTH_TOKEN" && echo true || echo false
PowerShell:
[bool]$env:ANTHROPIC_AUTH_TOKEN
Run claude from the configured terminal, then enter /status in the client to inspect the model and connection settings. The status screen is a configuration clue. Seeing Claude Code, Haiku, Sonnet, or Opus in the interface alone does not prove that a Claude model handled a request.
Next, send a short prompt yourself in Claude Code, such as “Reply only OK.” This makes a real request and is billed under current rules. Check request logs for success, the recorded model, and charges. Do not rely on the model’s self-identification in its reply.
Common errors and troubleshooting
| Symptom | First checks |
|---|---|
| 401 / authentication failed | Use your service Key without extra spaces; check whether it was rotated and whether the URL and Key belong to the same service. Do not share the Key for inspection. |
| 403 / access denied | Check account status, endpoint selection, and current model access. Send support the error text and time, without the Key. |
| 429 / request limited | Read the full error and dashboard status; reduce concurrency and retry later. A 429 does not always mean insufficient balance. |
| Claude names still appear | Check ANTHROPIC_MODEL and all three default variables. Client names, model aliases, and the request model are distinct; cross-check request logs. |
| Settings do not apply | Exit the old client and launch from a new terminal. Check startup files, user environment, and client settings for conflicting values; ensure you edited the shell you actually use. |
| Timeout / network error | Check your local proxy and connection. Try the JP/SG URLs below, then see connection troubleshooting. |
If the main domain is slow, replace only ANTHROPIC_BASE_URL; keep other variables unchanged. The backup URLs also omit /v1:
https://jp.icodeeasy.cc
https://sg.icodeeasy.cc
Restart Claude Code after switching, then repeat verification. For troubleshooting, share the error code, time, and redacted logs, never the raw Key.
When switching models or terminals
If you previously configured Claude or Kimi, check existing model settings in this terminal before applying these values. Do not mix values from separate guides. To switch back, restore the URL, Key, and model variables according to that model’s guide.
A system terminal, an IDE terminal, and a running client can inherit different environments. Configure and verify in the same terminal you use to launch Claude Code.
Related guides and official references
- Claude Code installation and general setup
- Kimi setup guide: follow its own configuration when using Kimi; do not mix model names.
- Prices, balance, and usage
- Anthropic environment variables
- Anthropic model configuration
- Zhipu’s Claude Code guide: explains model alias configuration; its official URL, Keys, and subscriptions are separate from this service.
Related guides
Install Claude Code, Configure a Custom API, and Troubleshoot Windows
Install Claude Code, configure a custom API key and URL, verify Windows or Unix settings, and troubleshoot authentication, rate limits, and connections.
Kimi Code Setup: API Key, K3.1 Pro, and Claude Code
Set up Kimi Code CLI or Claude Code with K3.1 Pro. Compare persistent and temporary settings, verify your first call, and fix 401, model, and URL errors.
Qwen API and Claude Code setup guide
Configure Qwen3.8-Max or Flash in Claude Code with an I Code Easy API key. Follow macOS, Linux and Windows setup, model switching, verification and troubleshooting.