Qwen Code itself is free: the client is Apache-2.0 open source with no paid tier, so every dollar in a Qwen Code budget is model inference bought separately. The free Qwen OAuth tier that most tutorials still describe was discontinued on April 15, 2026, which means a 2026 budget starts from a purchased endpoint: an Alibaba Cloud Model Studio Coding Plan, a Token Plan Credit bundle, pay-as-you-go token billing, or a third-party endpoint you point the client at yourself.
Those four routes are metered in four different units — requests, Credits, tokens, and whatever your own provider bills — which is why comparing them by headline price alone produces the wrong answer. This page separates the software cost from the inference cost, shows a recomputable token estimate, and marks the numbers that could not be verified.
What the software costs and what the models cost
The QwenLM/qwen-code repository is Apache-2.0 and actively developed; the GitHub API reported it as not archived on September 21, 2026. Releases land weekly or faster: v0.24.0 went to npm as @qwen-code/qwen-code on September 16, 2026 and v0.24.2 followed on September 20, so check the registry rather than trusting any version printed on a page. Installation is npm (Node.js 22 or later), Homebrew, or a standalone installer.
Calling it a terminal CLI now understates it. The README headline describes an open-source AI coding agent for terminal, editor, desktop, browser and chat, and the project ships a desktop app, a web UI started with qwen serve --open, VS Code, Zed and JetBrains plugins, TypeScript, Python and Java SDKs, and chat channels. The repository's GitHub description field still calls it an agent that lives in your terminal, so the two disagree; the README is the one that lists the extra surfaces. None of those surfaces is a paid upgrade — they are all in the same free repository, and none of them includes inference.
One inheritance worth ruling out: Qwen Code was originally based on Google Gemini CLI v0.8.2, but the project states it stopped syncing with upstream at v0.1 and develops independently. Gemini CLI quotas and pricing do not transfer.
Qwen Code free limit: what ended, and when
The authentication documentation states that the Qwen OAuth free tier was discontinued on 2026-04-15 and that existing cached tokens may keep working briefly while new requests are rejected. OAuth is no longer a selectable entry in the /auth dialog; it remains documented only as a discontinued provider. This is the single most out-of-date fact in search results for this topic.
| Period | Free OAuth allowance | Evidence |
|---|---|---|
| Through v0.9.0 (npm February 3, 2026) | 2,000 requests/day, 60 requests/minute | The auth documentation shipped in the v0.9.0 tag |
| From v0.10.0 (npm February 9, 2026) | 1,000 requests/day, 60 requests/minute | Same file in the v0.10.0 through v0.14.0 tags |
| From April 15, 2026 | None — discontinued | Current auth documentation; issue #3316, opened April 16 and closed |
Two cautions about this table. The exact calendar date the daily quota fell from 2,000 to 1,000 was not announced anywhere we could find; the bracket above is derived from which release tag the shipped documentation changed in, not from a Qwen announcement. And a widely repeated claim that the quota dropped to 100 per day before the shutdown appears in none of the release tags we checked: v0.9.0 through v0.14.0 are the versions that state a quota at all, they say 2,000 and then 1,000, and from v0.15.0 the file states no quota because the tier was already discontinued. Treat the 100-per-day figure as unsupported. No official blog post or press release about the shutdown was located either, so it was documented rather than announced.
Two more constraints matter for anyone hoping to revive the free path. Qwen OAuth models are hard-coded and cannot be overridden through modelProviders, so the discontinued route cannot simply be repointed at another endpoint. And OAuth was never usable headlessly: the docs note that in CI, SSH or container environments you typically cannot complete the browser login flow at all.
Three official endpoints, three billing units
Inside /auth, Alibaba ModelStudio opens a sub-menu with Coding Plan, Token Plan and Standard API Key. These are not three ways to pay the same bill: the documentation gives each its own endpoint host and its own key, and tells you to match the baseUrl to the plan the key belongs to. Coding Plan keys start with sk-sp-; Token Plan keys carry no prefix requirement.
| Route | Billed in | Published price | Endpoint host |
|---|---|---|---|
| Coding Plan Pro (international) | Requests | $50/month | coding-intl.dashscope.aliyuncs.com |
| Coding Plan Pro (China site) | Requests | ¥200/month, first month ¥39.90 for new customers | coding.dashscope.aliyuncs.com |
| Token Plan, Personal | Credits | Lite $8 (promotional $6), Essential $16 ($10), Standard $25 ($18), Pro $80 ($68) per month | token-plan.ap-southeast-1.maas.aliyuncs.com |
| Token Plan, Team | Credits | Standard $30 ($20), Pro $100 ($75), Max $200 per seat per month | Same Singapore host |
| Standard API key | Tokens | Per-model, tiered by input length | dashscope.aliyuncs.com |
The Coding Plan page prices Pro at $50 per month with three simultaneous caps: up to 6,000 requests per 5 hours, 45,000 per week and 90,000 per month. When any limit is reached, calls are paused. The weekly quota resets Monday at 00:00:00 UTC+08:00 and the monthly quota on your renewal date. Alibaba states these are not cumulative and do not represent capacity spread evenly over time.
What one request actually costs you: the same page states that each query consumes quota by the number of model calls, and that simple tasks typically use 5-10 calls while complex ones use 10-30 or more. One instruction is therefore many requests. Taken at face value, 90,000 requests a month is somewhere between roughly 3,000 and 18,000 tasks — but Alibaba presents those call counts as typical rather than guaranteed, and says actual consumption varies with task complexity, context and tool usage. Measure it on your own account before sizing a plan.
Two stale figures to discard. The Coding Plan Lite tier is gone — the China page records that new subscriptions stopped on March 20, 2026 and renewals and upgrades on April 13, 2026 — so any comparison site still offering a cheaper Lite tier as a live option is out of date. And the ¥200 China price is not the $50 international price converted: ¥200 is materially below $50 at any recent exchange rate, so treat the two storefronts as separate commercial offers and confirm the price, currency and eligibility in your own console rather than assuming one converts into the other.
Token Plan needs two disclosures. First, a conflict: the Token Plan overview sells fixed monthly Credit bundles with a 7-day window for Personal and a monthly window for Team, and says unused quota does not carry over — while Qwen Code's auth documentation describes Token Plan as usage-based billing for teams and companies. Those descriptions disagree; the Alibaba page is the one selling it, and it reads as a subscription. Second, Alibaba states Token Plan is currently available only in the Singapore region, yet the client documentation also lists a Beijing Token Plan host. Confirm regional availability at checkout.
Finally, Credits do not convert to tokens on the page that sells them. The Token Plan overview publishes a Credit count per tier — 10,000 per 7-day window on Personal Standard, for instance — but no Credit-to-token rate and no per-model multiplier, so nothing on that page lets you state what $18 per month buys in tokens. If a rate exists elsewhere in your console, read it there rather than trusting a third party's conversion.
Pay-as-you-go rates, and an official page that expired
The Model Studio pricing page lists rates in USD per million tokens, tiered by the input length of each request. The table below is the Singapore column; the same page lists separate, materially lower China (Beijing) rates, so check which region your account bills in before using these numbers.
| Model | 0-32K input | 32K-128K | 128K-256K | 256K-1M |
|---|---|---|---|---|
| qwen3-coder-plus | $1 in / $5 out | $1.8 / $9 | $3 / $15 | $6 / $60 |
| qwen3-coder-next | $0.3 in / $1.5 out | $0.5 / $2.5 | $0.8 / $4 | Not listed |
Read the top tier before budgeting a long agent session: qwen3-coder-plus output goes from $5 to $60 per million tokens once a request's input passes 256K. A long-context agent conversation is not priced like a short one. New accounts in the Singapore region also receive a free grant of 1 million tokens per model, valid for 90 days from activation, model release or approval, whichever is later — a trial grant, not a free tier.
One trap deserves naming because it is on the official domain and still ranks: the qwen3-coder-plus price-drop page announces a context-cache discount whose promotional window ran from July 24 to August 23, 2025. It is official and expired at the same time. We have not printed rates for the other Qwen models here because the qwen3.7-plus table splits thinking and non-thinking output into separate columns and our reading of it was not reliable enough to publish.
Best API for Qwen Code: pointing the client somewhere else
Qwen Code speaks four protocols — OpenAI Chat Completions, OpenAI Responses, Anthropic, and Gemini/Vertex — and each can be pointed at a custom base URL. Its own documentation names OpenRouter and Fireworks AI as alternatives to switch to after the OAuth shutdown, so a third-party endpoint is a sanctioned path rather than a workaround. Kunavo serves /v1/chat/completions, /v1/responses and /v1/messages under https://api.kunavo.com/v1, which are three of those four wire formats.
Be clear about what that buys. Kunavo's catalog contains no Qwen text model, so this is not a cheaper way to run Qwen. It is a way to run Claude, GPT or Gemini models inside Qwen Code on one prepaid balance. Kunavo has also not runtime-tested Qwen Code against these endpoints, and there is no Kunavo setup page for this client the way there is for Cline or OpenCode. Treat the configuration below as a documented starting point and keep your working route available while you try it.
export OPENAI_API_KEY="your-kunavo-key"
export OPENAI_BASE_URL="https://api.kunavo.com/v1"
export OPENAI_MODEL="claude-sonnet-5"The base URL keeps its /v1 suffix — every OPENAI_BASE_URL example in the docs ends there, and Qwen Code appends the route itself. QWEN_MODEL is an accepted alias for OPENAI_MODEL. The equivalent one-file setup lives in ~/.qwen/settings.json.
{
"modelProviders": {
"openai": [
{
"id": "claude-sonnet-5",
"name": "Claude Sonnet 5",
"baseUrl": "https://api.kunavo.com/v1",
"envKey": "OPENAI_API_KEY"
}
]
},
"env": {
"OPENAI_API_KEY": "your-kunavo-key"
},
"security": {
"auth": {
"selectedType": "openai"
}
},
"model": {
"name": "claude-sonnet-5"
}
}Four configuration facts from the model providers reference and the authentication documentation linked above save real debugging time. Only OpenAI-compatible credentials have CLI flags — --openai-api-key and --openai-base-url exist, and there are no Anthropic or Gemini equivalents. Provider-specific environment keys do not select the auth type on their own, so export OPENAI_API_KEY rather than a vendor-named variable if you are wiring this with environment variables alone. Credential precedence puts the selected modelProviders entry above the CLI flags — its baseUrl and envKey outrank --openai-base-url and --openai-api-key, which is the one ordering most people guess backwards — then come the CLI flags, then environment variables, then settings.json. Only values entered through /auth in the running session sit above modelProviders. Environment variables include whatever the first .env file found contributes, and that file only fills in variables not already set — variables are not merged across multiple files. And modelProviders edits hot-reload in a running session while providerProtocol is read once at startup and needs a restart.
Two limits to plan around. The built-in web_search tool is backed by DashScope's own server-side search, so what switches it on is the host, not the plan: it is on for ModelStudio Standard API Key and Token Plan, and on for a custom or modelProviders entry that points at a recognised DashScope Responses host with a direct key. It is off for third-party providers and for custom endpoints on any other host — and off for the paid Coding Plan too, because that endpoint is not verified for this API. That last row is the giveaway: this is a host gate, not a penalty for bringing your own key. The documented alternatives are an MCP search server, or pointing tools.webSearch.model at a separate supported DashScope key while your main model runs elsewhere. Separately, wireApi: "responses" requires a genuinely Responses-compatible endpoint and the docs state there is no endpoint detection and no automatic fallback when a call fails. We have not tested Kunavo's Responses route against Qwen Code's requirements, so start on Chat Completions.
A monthly estimate you can recompute
Assume a month containing 20 million uncached input tokens and 1 million output tokens. At current Kunavo catalog rates, that arithmetic gives:
| Model | Input / output per 1M | Estimated month | Candidate role |
|---|---|---|---|
| Gemini 2.5 Flash | $0.09 / $0.75 | $2.55 | Bounded, high-volume edits |
| Claude Haiku 4.5 | $0.40 / $2.00 | $10.00 | Routine coding work |
| GPT-5.6 Terra | $0.70 / $4.20 | $18.20 | Mixed reasoning and tool use |
| Claude Sonnet 5 | $2.00 / $10.00 | $50.00 | Difficult repository changes |
This is token arithmetic on an assumed workload, not a measured Qwen Code task and not a bill ceiling. It excludes cache charges, external tools and tax, and it assumes the cheaper model finishes the work without extra attempts — the condition that actually decides whether a lower rate produces a lower bill. Kunavo's catalog amount is a billing floor rather than a cap: when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup. See billing details.
Note what this table cannot do. It cannot be set against the $50 Coding Plan, because that plan meters model calls and this estimate meters tokens, and a call count carries no token count. It cannot be set against Token Plan either, because Credits have no published token conversion. Comparing a subscription to metered billing requires your own measured usage on both.
Kunavo starts at a $10 prepaid top-up with no subscription. That is the cash to open a funded account, not the cost of a task.
Cheapest API for Qwen Code: which route wins when
| Choose | When it fits | What you give up |
|---|---|---|
| Coding Plan subscription | Steady daily Qwen usage that stays inside the request caps | Paused calls at any cap; no built-in web search; quota shared with any other tool using the key |
| Standard pay-as-you-go tokens | Spiky or occasional use, and long-context sessions you want to price precisely | Input-length tiers that raise the rate sharply on large requests |
| Token Plan Credits | You have confirmed the Credit rate for your models in your own console | No public conversion, non-rolling windows, Singapore availability |
| A gateway such as Kunavo | You want Claude, GPT or Gemini models in Qwen Code on one prepaid balance | No Qwen models; custom-provider setup; no built-in web search |
| Local inference | You own suitable hardware and the model handles your tool workflow | Hardware, maintenance and tool-calling reliability become yours |
Keep the two questions apart. The cheapest listed price per million tokens is a fact you can read off a page; the lowest cost to finish your task is a measurement nobody has published for this client, including us. Run the same three tasks — a small edit, a bug fix and a multi-file investigation — on two routes and compare the recorded charges before committing.
If the gateway route is the one you want to try, create a Kunavo account, then follow the quickstart and the Chat Completions reference for the endpoint and model IDs. For the same decision on other clients, see OpenCode pricing, Cline pricing and the OpenAI-compatible API guide.
FAQ
How much does Qwen Code cost?
The Qwen Code client costs nothing. It is Apache-2.0 open source on GitHub at QwenLM/qwen-code, with no paid tier, no seats and no subscription, and the desktop app, web UI, editor plugins and SDKs ship in the same free repository. What you pay for is model inference, bought separately from whichever endpoint you configure.
Is Qwen Code still free? What is the Qwen Code free limit?
The software is still free. The free hosted inference is not: Qwen Code's own authentication documentation states that the Qwen OAuth free tier was discontinued on 2026-04-15, and OAuth is no longer a selectable entry in the /auth dialog. Tutorials quoting 2,000 requests per day describe the quota that shipped through v0.9.0 in February 2026. The remaining free allowance on Alibaba's platform is a new-account grant of 1 million tokens per model in the Singapore region, valid 90 days, which is a trial grant rather than a free tier.
What is the best API for Qwen Code?
It depends on which model you want. For Qwen models specifically, Alibaba Cloud Model Studio is the first-party source: a Coding Plan subscription if your usage is steady and request-shaped, or pay-as-you-go token billing if it is spiky. Qwen Code's own documentation also names OpenRouter and Fireworks AI as alternatives after the OAuth shutdown. If you want to run Claude, GPT or Gemini models inside Qwen Code instead, any OpenAI-compatible, Anthropic or Gemini endpoint can be set as a custom provider.
What is the cheapest API for Qwen Code?
The lowest listed price per million tokens and the lowest cost to finish a task are different questions, and only the first one can be answered from a price page. Among Alibaba's published Singapore rates, qwen3-coder-next at $0.30 input and $1.50 output per million tokens (0-32K input tier) is cheaper than qwen3-coder-plus at $1 and $5. Whether a cheaper model is actually cheaper for your repository depends on how many attempts it needs, which no published price table measures.
Does a Coding Plan subscription only work with Qwen Code?
No. Alibaba Cloud's Coding Plan page lists Claude Code, Cline, Cursor, Codex, OpenCode, OpenClaw, Qoder, Lingma, Cherry Studio, Chatbox and others among supported tools, and its model list includes non-Qwen models such as glm-5, kimi-k2.5 and MiniMax-M2.5. One subscription is not tied to one client, which also means quota consumed by another tool is quota Qwen Code no longer has.
Can I use Kunavo credit to pay for Qwen models in Qwen Code?
No. Kunavo's catalog contains no Qwen text model, so Kunavo cannot be a cheaper route to Qwen inference. What Kunavo can do is serve Claude, GPT and Gemini models over OpenAI-compatible, Responses and Anthropic Messages endpoints, which are wire formats Qwen Code documents support for. Kunavo has not runtime-tested Qwen Code against those endpoints, so treat that configuration as a documented path to try, not a verified integration.
Qwen Code repository, release data and documentation checked September 21, 2026 against github.com/QwenLM/qwen-code, the npm registry and the shipped docs on the main branch and on the v0.9.0 through v0.15.0 release tags. Alibaba Cloud Coding Plan, Token Plan and model pricing pages checked the same day. Kunavo token rates are read from the live catalog; the monthly totals are illustrative token arithmetic, not measured task costs.