Skip to content
MizanStack

Qwen Code is free. The free Qwen model behind it is gone.

If an older tutorial told you to sign in with Qwen OAuth and get free daily requests, stop: Qwen's own docs say that free tier was discontinued on 2026-04-15. The agent itself is still free and open source. The model that powers it is where the cost, or the hardware, comes in.

The short answer on Qwen Code

  • Qwen Code, the terminal agent, is open source under the Apache-2.0 license. Installing it costs nothing.
  • Qwen OAuth, the free hosted login that used to power it, is discontinued. It no longer appears in the /auth menu.
  • Alibaba Cloud Model Studio still has a free quota for new users, but only in the Singapore region, only for some models, and it expires after 90 days.
  • OpenRouter: on 2026-11-06 its public model list had no Qwen model with a :free ending.
  • A Qwen model running on your own computer with Ollama is the only option here with no usage meter. It costs hardware and patience instead.

What Qwen Code actually is

Qwen Code is a coding agent that lives in your terminal. You open it inside a project folder, describe a task in plain words, and it reads files, edits them and runs commands, asking you before it does anything risky. Its repository (opens in a new tab) describes it as open source with the Apache-2.0 license, and says it also comes as IDE plugins, a desktop app, a web UI and SDKs.

The agent is only the hands; the thinking happens in a model that has to run somewhere. The agent speaks the OpenAI, Anthropic, Gemini and Qwen API styles, so it can talk to Alibaba's servers, to a gateway such as OpenRouter, or to a model on your own machine. "Is Qwen Code free?" really means "who pays for the model?"

What ended on 15 April 2026

The official authentication page (opens in a new tab) is blunt: "The Qwen OAuth free tier was discontinued on 2026-04-15." It adds that cached tokens may keep working briefly, but new requests are rejected, and it points users to Alibaba Cloud Coding Plan, OpenRouter, Fireworks AI or another provider.

The /auth menu today offers four entries: QwenCloud (the one the docs call recommended), Alibaba ModelStudio, Third-party Providers (OpenRouter is in that list) and Custom Provider for local servers and proxies. None of them is labelled free. If a video or blog post shows a one-click free login, it is older than April.

The docs also mention paid plans (a Coding Plan, a Token Plan, pay-as-you-go keys) but the auth page gives no prices. Coding Plan and Token Plan prices are on Alibaba Cloud's plan pages, not in the Qwen Code docs; compare them with the per-token prices below.

Model Studio: a new-user quota with strings attached

Alibaba Cloud's free quota page (opens in a new tab) says the quota is granted automatically when you first activate Model Studio. The conditions it lists:

  • Singapore region only, and only for models that have the International deployment scope.
  • Each model has its own quota, typically 1,000,000 tokens. You cannot move it between models.
  • Valid for 90 days from activation, model release or approval, whichever is later.
  • Real-time inference only. Batch calls, fine-tuning and deployment are excluded.
  • Re-registering does not give you a second quota.
  • Without the "Free Quota Only" setting (off by default), usage past the quota is billed pay-as-you-go.

The page also says free quotas for a list of models were removed on 2026-10-29, and new users no longer get a quota for them. It names qwen-plus and qwen3.6-plus among them. The billing page (opens in a new tab) (last updated 2026-11-05) shows "No free quota" for qwen-plus and qwen-flash, and a 1,000,000-token free quota for qwen3.7-plus and qwen3.7-flash.

What it costs once the quota is gone, in Singapore prices per million tokens: qwen-flash is $0.05 input and $0.4 output, qwen-plus is $0.4 input and $1.2 output (short prompts). Which models still qualify changes, and the page says to check the Model Gallery in the console. Coding agents burn tokens quickly because they re-send file contents, so one million tokens may be one or two serious sessions, not a month.

OpenRouter: free Qwen is not there today

For a general look at free models there, see OpenRouter free models. OpenRouter marks its free variants with a :free ending, and its limits page (opens in a new tab) says those variants get 20 requests per minute, with 50 requests per day if you have bought fewer than 10 credits in total and 1,000 per day if you have bought at least 10. We listed the public model list (opens in a new tab) on 2026-11-06: 454 models, 42 with "qwen" in the id, and none of the Qwen ones ended in :free.

Qwen models are there as paid models, and cheap ones. For example the list shows qwen/qwen3-coder at about $0.30 per million input tokens and qwen/qwen3.7-flash at about $0.03. These are list prices today and they move. If a free Qwen variant appears later, the same limits would apply.

To point Qwen Code at OpenRouter, the docs say to use /auth, or set these two variables (with your own key):

export OPENROUTER_API_KEY="your-key"
export OPENAI_BASE_URL="https://openrouter.ai/api/v1"

Local Qwen with Ollama: free, but you pay in RAM

Ollama's qwen3-coder page (opens in a new tab) lists a 30B model (3.3B active parameters) as a 19GB download with a 256K context window, and a 480B model that needs at least 250GB of memory. So the 30B is the realistic one, and 19GB is a download size: you also need enough memory to run it, so plan for more than 19GB of free RAM or unified memory.

For the basics of running models locally, see run models locally with Ollama. Qwen Code treats Ollama as an OpenAI-compatible server. Quit the Ollama app first, or the port is in use. Then start the server with a larger context window (the default context truncates agent prompts), run the model in a second terminal, and set a placeholder key (the docs say local servers that need no authentication accept any value):

OLLAMA_CONTEXT_LENGTH=32768 ollama serve
ollama run qwen3-coder:30b
export OLLAMA_API_KEY="ollama"

Then add a provider entry in ~/.qwen/settings.json. This follows the structure in the model providers docs (opens in a new tab), whose own example uses a different model, so the model id here is our substitution:

{
  "modelProviders": {
    "openai": [
      {
        "id": "qwen3-coder:30b",
        "name": "Qwen3-Coder 30B (Ollama)",
        "baseUrl": "http://localhost:11434/v1",
        "envKey": "OLLAMA_API_KEY"
      }
    ]
  },
  "security": { "auth": { "selectedType": "openai" } },
  "model": { "name": "qwen3-coder:30b" }
}

Nothing is billed and no request leaves your computer. The cost is speed and quality: a 30B model on a laptop will be slower and weaker than Alibaba's hosted flagship models.

Installing the agent

The README lists several install routes. The npm route needs Node.js 22 or later. Homebrew works on macOS and Linux. The README also has one-line scripts for Linux, macOS and Windows; read any script before piping it into a shell.

npm install -g @qwen-code/qwen-code@latest
brew install qwen-code

Restart your terminal after installing, as the README says, open your project folder, run qwen, then type /auth and choose Custom Provider or Third-party Providers, depending on which route above you picked.

Which route fits whom

  • Just curious, small tasks: Model Studio new-user quota, if your region and model qualify. Watch the 90-day clock.
  • Daily use on a budget: pay-per-token through OpenRouter or Model Studio. Set a spending cap in the dashboard first.
  • Private code or no internet: local Ollama. Slower, but nothing leaves the machine.
  • Not for you: anyone with an old laptop and 8GB of RAM expecting the local route to feel like a hosted model, or anyone who needs a guaranteed free tier that will not change next month.

Compared with other terminal agents such as OpenCode, the main difference is the default model deal, not the agent: all of them need a model from somewhere, and free hosted offers come and go.

What leaves your machine with Qwen Code

  • With hosted routes (Model Studio, QwenCloud, OpenRouter), the prompts and the file contents the agent reads are sent to that provider. With Ollama on localhost they are not.
  • The docs say credentials are read in this order: CLI flags, system environment, .env files, then the env block of settings.json. They recommend .qwen/.env over putting keys in settings.json, and warn not to commit keys to version control.
  • The agent can run shell commands and edit files in your folder. Start it in a project folder, not your home directory, and read each command before approving it.

Questions about Qwen Code

My old Qwen OAuth login stopped working. Is it my setup?

No. The docs say the free tier ended on 2026-04-15 and new requests are rejected. Switch provider.

Is the Qwen Code agent itself ever going to charge me?

Nothing in the repository says so. It is Apache-2.0 licensed. Charges come from the model provider you connect.

Can I stay at zero cost for good?

Only with a local model. Hosted free offers have expiry dates or have already been removed, as the October 2026 removals show.

Checked 2026-11-06: official sources

Every limit, price and date above was read on these pages on 2026-11-06. They change often, so re-check before you rely on a number.

Checked against the official pages on 6 November 2026. Free tiers change often, so check the sources.