Guides · dev · glm claude code
Use Chinese models in Claude Code: the base URLs we could verify
Claude Code speaks the Anthropic Messages API. A Chinese lab can sit behind it only if that lab publishes a compatible base URL and you send their key. A blog that prints five base URLs with equal confidence is usually copying. These are the two we saw on the vendor’s own docs on 16 Oct 2026.
Z.AI
From the GLM-5.3 docs:
ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
The same page also documents an OpenAI-style URL at https://api.z.ai/api/paas/v4. Coding agents that expect Anthropic messages want the first one. The coding plan and the pay-as-you-go key are different credentials. A plan key that works in their app can fail in a third-party client if the plan is limited to one protocol. The model page says the coding plan’s tools are oriented around the chat-completions path. If a client fails, that split is the first place to look, not a random proxy.
DeepSeek
The pricing page lists:
https://api.deepseek.com/anthropic
The model name on that API is deepseek-flash for the current flash tier and deepseek-v4-pro for the pro column. OpenRouter ids are not the same strings. If you leave the model id as an Anthropic name, you will get an error or, worse, a different product.
Kimi and Qwen
Moonshot’s model card says the API is OpenAI-compatible and Anthropic-compatible, and that Kimi Code can select K3 with a /model command. The card does not, in the text we used, print the raw base URL. We are not going to invent one. Copy it from platform.kimi.ai on the day you configure the tool.
Alibaba’s international Model Studio is a different console from the China account. Copy the base URL from the international docs after you are in the right account. A key from the wrong console is a common failure and it also means a different data region.
What a session costs if the mix is our illustration
| Model | Session | vs Opus | vs Sol | Cache price |
|---|---|---|---|---|
| glm-5.3-flash | $0.096 | 97% cheaper | 94% cheaper | published |
| deepseek-v4.1-flash | $0.066 | 98% cheaper | 95% cheaper | published |
| minimax-m3 | $0.324 | 89% cheaper | 78% cheaper | published |
| kimi-k3 | $1.35 | 54% cheaper | 8% cheaper | published |
| Anthropic: Claude Opus 5.5 | $2.94 | — | — | published |
| OpenAI: GPT-6.1 Sol | $1.47 | — | — | published |
The percentages in this table compare session cost. The price table's percentages compare blended token price. They answer different questions.
That chart is OpenRouter list prices, including the too-cheap GLM flagship if you add it yourself from the price table. For Z.AI’s own GLM-5.3 rate, use the official mode on the session-cost guide. Kimi K3’s output price is why it stops looking cheap once the agent writes code instead of only reading it.
Related: GLM Coding Plan, paying from abroad.
Questions
Can I point Claude Code at Z.AI?
Z.AI publishes an Anthropic-compatible base URL, https://api.z.ai/api/anthropic. You still need a Z.AI key. We did not run Claude Code against it.
Should I use the OpenRouter list price to estimate the session?
Only if OpenRouter is the host you will actually call. Z.AI's own GLM-5.3 price is higher than the OpenRouter list price.
Sources
- GLM-5.3 docs, accessed 2026-10-16
- DeepSeek API pricing, Anthropic base URL, accessed 2026-10-16
- Kimi K3 on Hugging Face, accessed 2026-10-16
- OpenRouter models API, accessed 2026-10-16