Use Alibaba Cloud Model Studio in Claude Code

Prices and modelsEndpoint verified 2026-11-09

Generate a Claude Code config from the Anthropic-compatible endpoint in Alibaba Cloud Model Studio's docs. The API key in the config is a placeholder; replace it with a key you create at Alibaba Cloud Model Studio.

Endpoints

  • Pay as you gohttps://dashscope.aliyuncs.com/apps/anthropicThe docs now recommend the workspace endpoint (https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/apps/anthropic); this older endpoint still works.Docs · verified 2026-11-09
  • Plan only: Model Studio Coding Plan Prohttps://coding.dashscope.aliyuncs.com/apps/anthropicThe Coding Plan only offers Chat Completions for Codex, which current Codex versions cannot use.Docs · verified 2026-11-09
  • Plan only: Model Studio Token Plan Lite, Essential, Standard, Prohttps://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropicDocs · verified 2026-11-09

Generate the config

Pick from the 30 models this provider sells, or type another model name.

Save to ~/.claude/settings.json; merge it in if the file already exists
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://dashscope.aliyuncs.com/apps/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_API_KEY": "",
    "ANTHROPIC_MODEL": "qwen3.7-max",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "qwen3.7-max",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "qwen3.7-max",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "qwen3.7-max",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "qwen3.6-flash"
  }
}

Models and prices

ModelInputOutputRatio
Kimi K3.1 Prokimi-k3.1-pro$1.95$10.191.00×
Kimi K3.1 Prokimi/kimi-k3.1-pro$1.95$10.191.00×
Kimi K3.1 Prokimi/kimi-k3.1-pro-highspeed$3.90$20.392.00×
MiniMax-M3.1-FlashMiniMax/MiniMax-M3.1-Flash$0.15$0.601.00×
GLM-5.3-FlashXZHIPU/GLM-5.3-FlashX$0.30$1.051.00×
DeepSeek V4.1 Flashdeepseek-v4.1-flash$0.30$1.202.00×
GLM-5.3-FlashZHIPU/GLM-5.3-Flash$0.12$0.421.00×
Qwen3.8 Flashqwen3.8-flash$0.12$0.4051.00×
GLM-5.3ZHIPU/GLM-5.3$1.20$4.201.00×
GLM-5.3glm-5.3$1.20$4.201.00×
DeepSeek V4 Prodeepseek-v4-pro$1.80$3.601.82×
DeepSeek V4 Prodeepseek-v4-pro-0813$1.35$4.052.04×
Qwen3.8 Maxqwen3.8-max$1.80$5.401.00×
DeepSeek V4 Flashdeepseek-v4-flash-0731$0.45$1.35—
Kimi K3kimi-k3$3.00$14.991.00×
Kimi K3kimi/kimi-k3$3.00$14.991.00×
GLM-5.2ZHIPU/GLM-5.2$1.20$4.201.00×
GLM-5.2glm-5.2$1.20$4.201.00×
Kimi K2.7 Codekimi-k2.7-code$0.974$4.051.00×
Kimi K2.7 Codekimi/kimi-k2.7-code$0.974$4.051.00×
Kimi K2.7 Codekimi/kimi-k2.7-code-highspeed$1.95$8.102.00×
Qwen3.7 Plusqwen3.7-plus$0.30$1.201.00×
MiniMax-M3MiniMax/MiniMax-M3$0.315$1.261.00×
Kimi K2.6kimi-k2.6$0.974$4.051.00×
Kimi K2.6kimi/kimi-k2.6$0.974$4.051.00×
GLM-5.1ZHIPU/GLM-5.1$1.20$4.201.17×
GLM-5.1glm-5.1$0.899$3.601.00×
MiniMax-M2.7MiniMax/MiniMax-M2.7$0.315$1.26—
MiniMax-M2.5MiniMax-M2.5$0.315$1.26—
MiniMax-M2.5MiniMax/MiniMax-M2.5$0.315$1.26—
$ per 1M tokens. Each model uses the provider's cheapest group; the ratio uses the output price

How to check it works

Restart Claude Code and send a message. If it replies and the request shows up in Alibaba Cloud Model Studio's console, it is using this endpoint.

FAQ

settings.json or environment variables?

settings.json applies every time Claude Code starts, for long-term use; the environment variables apply to the current terminal only, for a quick try.

How do I switch back to Anthropic?

Remove these variables from settings.json (or close the terminal where you set them), then restart Claude Code.

Does my key pass through this site?

No. The page only generates config text and never asks for your key; the key only goes into the config file or terminal on your own machine.

Claude Code configs for other providers