https://docs.z.ai/devpack/tool/claude
tldr
"env": {
"ANTHROPIC_AUTH_TOKEN": "your_zai_api_key",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic"
}
Although if you want an Actually Good Experience I recommend using Claude Code Routerhttps://github.com/musistudio/claude-code-router
because it allows you to intercept the requests and forward them to other models. (e.g. GLM doesn't seem to support search or images, so I use Gemini's free tier for that.)
(CCR just launches Claude with the base url set to a local proxy. The more adventurous reader can also set up his own proxy... :)