Guides · dev · glm claude code

Use Chinese models in Claude Code: the base URLs we could verify

Published 16 Oct 2026. Updated 16 Oct 2026. Researched 16 Oct 2026.

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.

Point a coding agent at a compatible host1Create a key on the lab's API site, not in the chat app2Set ANTHROPIC_BASE_URL to the lab's Anthropic endpoint3Set the auth token to that key, not an Anthropic key4Send one short request before you point a repo at it5Compare the invoice with the calculator, not with a tweet

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

Illustrative Coding-agent session costglm-5.3-flash$0.096deepseek-v4.1-flash$0.066minimax-m3$0.324kimi-k3$1.35Anthropic: Claude Opus 5.5$2.94OpenAI: GPT-6.1 Sol$1.47
Coding-agent session: 3 million input tokens, 90% served from cache, 60 thousand output tokens. Cache-write fees are not included. All rows use the OpenRouter list price. Comparators are OpenRouter list prices for Anthropic: Claude Opus 5.5 ($8.00/M blended) and OpenAI: GPT-6.1 Sol. Snapshot 2026-10-16. Cache-write fees are excluded. A missing cache price is billed as a full input token.
ModelSessionvs Opusvs SolCache price
glm-5.3-flash$0.09697% cheaper94% cheaperpublished
deepseek-v4.1-flash$0.06698% cheaper95% cheaperpublished
minimax-m3$0.32489% cheaper78% cheaperpublished
kimi-k3$1.3554% cheaper8% cheaperpublished
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

  1. GLM-5.3 docs, accessed 2026-10-16
  2. DeepSeek API pricing, Anthropic base URL, accessed 2026-10-16
  3. Kimi K3 on Hugging Face, accessed 2026-10-16
  4. OpenRouter models API, accessed 2026-10-16