I just asked glm-4.6 how to setup a z.ai api key with claude code and it kept on saying it has no idea what claude code is...
Quite funny, actually.
Quite funny, actually.
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... :)
Humans : 1
AI : 0