Alibaba Cloud Model Studio for coding agents: plans and endpoints
Updated Fact-checked
Alibaba Cloud Model Studio sells Qwen models to coding agents in three ways: Token Plan, a subscription and Alibaba’s recommended product now; Coding Plan, an older subscription that is mostly closed; and pay-as-you-go per token. Each has its own API key and its own base URL, and a key only works with its own URL. Pick the plan first, then copy the endpoint for your agent from the table below.
Which plan: Token Plan, Coding Plan or pay-as-you-go?#
| Token Plan | Coding Plan | Pay-as-you-go | |
|---|---|---|---|
| Status | Open. Personal and Team editions | Lite closed to new buyers since 20 March 2026. Pro has limited slots, restocked daily | Open |
| How you pay | A subscription, metered in Credits | A subscription with request caps | Per token |
| Key starts with | sk-sp- |
sk-sp- |
sk- or sk-ws |
| Use | Interactive use in compatible tools | Interactive use in programming tools only. Scripts and backends are prohibited | Anything, including scripts and CI |
| Models | Qwen3.8 Max and Flash, Qwen3.7, plus DeepSeek, GLM and others | Qwen3.7 Plus, Qwen3.6 Plus, Qwen3.5 Plus, Kimi, GLM, MiniMax | Qwen3.8 Max and Flash, Qwen3.7 Plus, DeepSeek and others |
Prices change, so they aren’t here: see the Token Plan and Coding Plan pages. How the plans differ, and what to do if you hold a Coding Plan, is in Qwen Coding Plan and Token Plan.
Pay-as-you-go is the only one of the three you can use from a script or CI job. A Coding Plan key used that way can be suspended or revoked.
The three endpoints#
Every plan exposes the same two API styles under its own host:
| Plan | OpenAI-compatible | Anthropic-compatible |
|---|---|---|
| Token Plan | https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 |
https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic |
| Coding Plan | https://coding-intl.dashscope.aliyuncs.com/v1 |
https://coding-intl.dashscope.aliyuncs.com/apps/anthropic |
| Pay-as-you-go | https://<WorkspaceId>.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 |
https://<WorkspaceId>.ap-southeast-1.maas.aliyuncs.com/apps/anthropic |
Replace <WorkspaceId> with your workspace ID from the console. Alibaba’s regions page also lists a shared DashScope host per region; its example is https://dashscope.aliyuncs.com/compatible-mode/v1 for Beijing. It recommends the workspace host.
Which agent needs which style:
- OpenAI-compatible: Qwen Code, Codex CLI, Cline, Kilo Code, Contenox Harness.
- Anthropic-compatible: Claude Code, and OpenCode in Alibaba’s own config.
The key-and-URL trap: a plan key sent to another plan’s URL fails. A Coding Plan key at the general Model Studio URL returns a 403, and a general key at a plan URL returns a 401. Check the sk-sp- prefix and the host together before you debug anything else.
Every agent: base URL and config file#
Token Plan values. For the other plans, swap in the host from the table above.
| Agent | Where | What to set |
|---|---|---|
| Qwen Code | ~/.qwen/settings.json |
modelProviders.openai entry with baseUrl …/compatible-mode/v1 and envKey BAILIAN_TOKEN_PLAN_API_KEY; security.auth.selectedType openai |
| Claude Code | ~/.claude/settings.json, env block |
ANTHROPIC_BASE_URL …/apps/anthropic, ANTHROPIC_AUTH_TOKEN your key |
| Codex CLI | ~/.codex/config.toml |
[model_providers.Token_Plan], base_url …/compatible-mode/v1, env_key = "OPENAI_API_KEY", wire_api = "responses" |
| OpenCode | Project opencode.jsonc |
Configure the plan endpoint and credential under providers. OpenCode v2 example |
| Cline | Settings → API Provider | OpenAI Compatible, Base URL …/compatible-mode/v1 |
| Kilo Code | Settings → Providers → Custom provider | OpenAI Compatible, same Base URL |
| Contenox Harness | Backends → Providers → Alibaba Cloud Model Studio | Enter the key, then set Advanced → Base URL to the OpenAI-compatible endpoint for that key’s plan and region. |
On Windows the home folder is C:\Users\<you>, so the Qwen Code file is C:\Users\<you>\.qwen\settings.json. The complete Claude Code, Codex and OpenCode blocks are on the Qwen page.
The OpenCode URL ends in /v1 and the Claude Code URL doesn’t. Both are right for their own agent.
How do I create an API key?#
For a pay-as-you-go key, open the Model Studio API Key page, choose a region at the upper right and select Create API Key. Set a workspace, and copy the key at once: after you close the dialog the plaintext key can’t be shown again. Alibaba’s examples keep it in DASHSCOPE_API_KEY; on Windows, setx DASHSCOPE_API_KEY "your-key-here" and reopen your terminal.
A Token Plan Personal key comes from the subscription page after you subscribe. For Team, an administrator assigns you a seat and you create the key from the organization members page. Team and Personal keys aren’t interchangeable.
Keys don’t expire. They stay valid until deleted, so a leaked one keeps working. See keep secrets away from AI agents.
International or China?#
Model Studio runs separate regions, and each has its own endpoint, API key and model list. A key from one region doesn’t work in another.
| Region | DashScope host |
|---|---|
| Singapore | dashscope-intl.aliyuncs.com |
| China (Beijing) | dashscope.aliyuncs.com |
| China (Hong Kong) | cn-hongkong.dashscope.aliyuncs.com |
US (Virginia), Germany (Frankfurt) and Japan (Tokyo) are also listed, but only through workspace-specific hosts of the form <WorkspaceId>.<region>.maas.aliyuncs.com. Alibaba recommends that workspace host over the shared one.
Request data is stored in the region you select, and inference runs in the deployment scope you choose. The plan setups in Alibaba’s docs use the Singapore region. For a Beijing Coding Plan, Qwen Code’s docs give https://coding.dashscope.aliyuncs.com/v1.
Why do I get 429?#
- Too many requests: wait about a minute and run fewer agents in parallel. Token Plan’s concurrency limit moves with platform load, and parallel agents share it.
insufficient_quotaon Token Plan: the seat’s monthly allowance is used up. It doesn’t carry over; wait for the reset, buy a shared pack, or add seats.- Coding Plan: a cap is hit. Three caps apply at once (a rolling window, a week and a month), and whichever is reached first pauses calls.
- Codex: reset times in 429 messages are in UTC. Add 8 hours for Singapore time.
Contenox Harness#
Contenox Harness connects to Model Studio through its own Alibaba Cloud Model Studio provider, with the international endpoint as the default and a Base URL field for the China and Coding Plan endpoints from the table above.
- Open Backends → Providers and, under Recommended, choose Alibaba Cloud Model Studio.
- Select Create key, create a key in Model Studio and copy it.
- Paste it into API Key. Under Advanced → Base URL, use the OpenAI-compatible endpoint for your key’s plan and region. Token Plan and Coding Plan both issue
sk-sp-keys, and each needs its own endpoint from the table above. - Select Connect and wait for Connected. The Model chip then lists the models your key can reach.
To keep the key out of the app, enter DASHSCOPE_API_KEY under Advanced in Environment variable name and set the variable on your system instead.
On releases before the provider shipped, the same works through More providers → OpenAI with the Model Studio key and the endpoint in Base URL; type the model name in the Model chip.
contenox-runtime backend add alibaba --type alibaba-cloud --api-key-env DASHSCOPE_API_KEY
Related#
Qwen coding agent: Qwen Code and every agent’s full stepsQwen coding agent: API key, models and setupSet up a Qwen coding agent: Qwen Code, or your Alibaba Cloud key in Claude Code, Codex CLI, OpenCode, Cline or Contenox Harness, plus models, errors and data region.
Qwen Coding Plan and Token Plan: what each plan gives youQwen Coding Plan and Token Plan: what you get, which agents workThe Qwen Coding Plan is closed to new Lite buyers and Alibaba now points to Token Plan. What each gives you, which agents work, the limits in words, and setup.
Best Qwen model for coding: models by jobBest Qwen model for coding: cloud and local, by jobThe best Qwen model for coding by job: qwen3.8-max, flash and plus in the cloud, and exact Ollama tags for 12, 24, 48 and 64 GB of memory, checked November 2026.
Which AI provider for coding agents?Which AI provider for coding agents? A decision guideWhich AI provider for coding agents: subscription or API key, cloud account or local, and which providers work in Claude Code, Codex CLI and OpenCode.
AI coding costsAI coding costs: why agents burn tokens and how to cut itAI coding costs explained: why one agent session can send hundreds of millions of tokens, what sessions really cost, and the habits that cut the bill.
ChatGPT subscriptionUse your ChatGPT subscription for a coding agent | ContenoxUse your ChatGPT subscription for a coding agent. Set up device sign-in in Contenox or use Codex on desktop, in an editor or in the terminal. Check plan limits.
GitHub Copilot subscriptionUse your GitHub Copilot subscription in other coding agentsUse your GitHub Copilot subscription outside VS Code: sign-in steps for OpenCode, Codex and Contenox Harness, which plans you need, and how AI Credits are billed.
Anthropic (Claude)Claude coding agent on Windows: API key setup | ContenoxRun a Claude coding agent on Windows: Claude Code with a subscription or API key, OpenCode with a key, why Codex can't, plus models, billing and key errors.
GeminiGemini coding agent: API key, free tier and setup | ContenoxSet up a Gemini coding agent: AI Studio key in OpenCode, Antigravity CLI or Contenox Harness, why Claude Code and Codex can't, free-tier data use, models and 429 fixes.