Blog

Qwen Code: plans, payment requirements, and key formats

Markdown

Coding Plan, Token Plan, and pay-as-you-go: Qwen Code prices, Alibaba Cloud requirements, key and endpoint matching, and errors after payment.

Read full article

Free access to Qwen Code was shut down on April 15, 2026. Instructions promising two thousand free requests per day describe Qwen as it was four months ago.

I’m looking at what works as of August 22, 2026: what you pay for, how much each payment method costs, and what requirements the platform imposes.

For how to use the service, see the Ailoot documentation.

What are you paying for when you say “buy Qwen Code”?

Key takeaway

Qwen Code is a free, open-source program; you can’t buy it. You pay for access to the model behind it. That’s where the confusion comes from: the Qwen browser chat is free, while the same Qwen in the terminal requires paid access. They’re different products from the same company, and they’re paid for differently.

“I was told it’s paid, but it works for me for free” is the question that comes up more than any other. Both statements are true, and they refer to different things.

The browser chat on the Qwen website is an ordinary chat for people: you go there and type. Qwen Code is an AI agent that lives in your terminal, reads your project, edits files, and runs commands. It connects to a model on a server, and Alibaba sells access to that separately.

The program itself is on GitHub, installs with one command, and never costs anything. You pay for how many times it connects to the model.

If you just need to talk to a model and get a piece of code in your browser, there’s nothing to pay for. If you need an agent that can work through your files on its own, you need paid access.

Alibaba has no separate chat subscription that would give you access to Qwen Code. Everything related to the terminal is paid for through the Alibaba Cloud Model Studio cloud platform.

Was free access to Qwen Code really shut down?

Key takeaway

Yes. Sign-in through a Qwen account was disabled on April 15, 2026, as the team announced itself. Two days earlier, the daily quota had been cut from one thousand requests to one hundred. The only free access left is the new Alibaba Cloud account starter quota: one million tokens per model for 90 days, with no card required.

The timeline is documented in the team’s GitHub announcement. On April 13, the daily quota was cut tenfold, and two days later sign-in was shut down completely.

Qwen OAuth sign-in is no longer shown in the selection dialog; its free tier ended on April 15, 2026. It remains in the documentation only as a hard-coded, discontinued connection method.

— Qwen Code documentation, authentication section, https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/

The project team stated the reason matter-of-factly: a product strategy change to reduce the cost of the free tier.

The frustrating part is how it looks from the user’s side. The program reports an expired-token error, so you keep trying to sign in again in a loop—but there’s nowhere to sign in: the entire sign-in method has been disabled. For the causes of sign-in errors and restoring the agent, see an analysis of Qwen’s discontinued free sign-in.

What remains free today:

  1. The Model Studio starter quota for a new account — one million tokens for each model, with a separate limit for each. It lasts 30 to 90 days from activation. It works only on the international platform, in the Singapore region. No card is required to activate it.
  2. Running models locally through Ollama or vLLM. The Qwen Code documentation covers this in a separate section. You pay for hardware and electricity; cloud access isn’t needed at all.

A million tokens is enough to find out whether the tool suits you. It isn’t enough for ongoing work—the agent uses up context quickly.

What payment requirements does the platform impose?

Key takeaway

Alibaba accepts only Visa, Mastercard, AMEX, and JCB cards with international payments enabled.

Anthropic has a public list of supported countries.

To be clear: “I couldn’t find it” and “it doesn’t exist” are different things, and internal risk assessment rules and filtering by card number aren’t publicly documented anywhere, so I won’t make claims about them. The product terms also include a general provision: users themselves are responsible for complying with sanctions regimes. The agreement doesn’t resolve that issue; it puts the responsibility on you.

Alibaba states the card requirement directly.

Only Visa, Mastercard, AMEX, or JCB credit and debit cards with international payments enabled are accepted. Prepaid, gift, and virtual cards, as well as cards with UnionPay only, are not supported.

— Alibaba Cloud, payment FAQs, https://www.alibabacloud.com/help/en/user-center/support/payment-faq

Virtual and prepaid cards are explicitly excluded: the method people recommend more readily than any other is officially unsupported by the platform.

When you add a card, the platform places a one-dollar preauthorization.

A few details can derail your plans at the next step:

  • One card, one account. If a card is already linked to another account, including one in a dormant period, you must unlink it first. You can’t create a second account with the same card.
  • The account country determines the billing currency and tax rate. You select it once during registration, and it determines everything else, from the charge currency to the set of accepted cards.
  • The phone country code must match the account country.

How much does Qwen Code cost in 2026, and how do the plans differ?

Key takeaway

There are three payment options, and they aren’t interchangeable. Coding Plan is a $50-a-month subscription with a request quota. Token Plan is a credit-based subscription starting at $30 per seat. Pay-as-you-go bills by token count with no subscription. Each has its own key format and server endpoint; the keys don’t work across plans.

It’s worth distinguishing these three options before paying: most mix-ups and overspending happen when people choose the wrong plan.

The plan people usually mean when they write “buy a Qwen subscription” is Alibaba Cloud’s Coding Plan. It’s also often called “Qwen Cloud Coding Plan” in searches: the subscription is on the cloud platform, so the name varies between Qwen and Alibaba.

OptionPriceWhat it gives youFor whom
Coding Plan Pro$50/month6,000 requests / 5 hours, 45,000 / week, 90,000 / monthDaily terminal work
Token Plan Team, Standard$30 per seat per month25,000 credits per seatTeams, broad model selection
Token Plan Personal39-499 ¥/month on promotionFrom 2,500 credits for 7 daysChinese accounts only
Pay-as-you-goFrom $0.30 per million input tokensBilled based on actual usageOccasional tasks, trying it out

Lite, the cheapest plan in the lineup, has been closed to new subscriptions since March 20, 2026, and renewals ended on April 13. That’s how Qwen stopped being the most affordable in its class: at $50, it now costs more than Claude’s $20 subscription.

Coding Plan has three quota limits that apply simultaneously: a rolling five-hour limit, a weekly limit that resets on Monday, and a monthly limit on the renewal date. Unused quota doesn’t roll over. The same subscription also includes GLM, Kimi, and MiniMax models in addition to Qwen; Alibaba lists the lineup on the plan page.

The documentation says a simple task uses five to ten model calls. That means 90,000 requests a month is enough for around nine to eighteen thousand tasks—plenty for one person.

The plan description has a separate restriction.

Do not use the plan key for automated scripts, application backends, or other scenarios without human involvement.

— Alibaba Cloud, Coding Plan description, https://www.alibabacloud.com/help/en/model-studio/coding-plan

In other words, the plan is for hands-on work in an editor and terminal. You can’t put it in your own production product; pay-as-you-go is provided for that.

Which is cheaper: a subscription or pay-as-you-go?

Key takeaway

Coding Plan pays for itself at around four and a half thousand requests per month, or about 150 a day. Below that threshold, pay-as-you-go is cheaper. Token Plan costs about seven times as much per request as Coding Plan; its purpose is different: a broad selection of models and sharing across a team.

Here’s a straightforward calculation with the assumptions spelled out, so you can substitute your own numbers.

Coding Plan Pro. Divide $50 by 90,000 requests and you get about six hundredths of a cent per request.

Token Plan Team Standard. $30 for 25,000 credits. The documentation gives an example in which one request to qwen3.6-plus used about 3.18 credits. That works out to around 7,800 requests a month, or about 0.38 cents per request. That’s almost seven times the Coding Plan price.

Pay-as-you-go. I’m using a typical agent request: ten thousand input tokens and two thousand output tokens. For qwen3.6-plus, that’s $0.50 per million input tokens and $3 per million output tokens. One request comes to about 1.1 cents. The $50 subscription pays for itself at 4,500 requests a month.

This is a rough estimate: the actual request size can vary severalfold because the agent pulls project files into context. But it gives you the right order of magnitude. If you work in the terminal every day, a subscription pays off. If you use it once a week, pay-as-you-go is cheaper.

Paid access to a powerful model doesn’t solve everything by itself. The same plan can support one person’s work project for months, while another person uses it up in a week redoing things: each time, the model starts from scratch and knows neither the project’s goals nor its decisions.

This is called context engineering. The plan stays the same, while fewer requests are needed for the same work.

Here’s a third scenario: your Coding Plan quota runs out, and everything stops.

Once the Coding Plan quota is exhausted, requests to the model will fail, and work will not automatically switch to pay-as-you-go.

— Alibaba Cloud, Coding Plan FAQs, https://www.alibabacloud.com/help/en/model-studio/coding-plan-faq

There’s no automatic backup. If you hit the monthly quota on the twentieth, you have to wait for the reset or buy an additional package.

How do you buy a Coding Plan subscription, step by step?

Key takeaway

The order is: register on the international Alibaba Cloud platform, verify your identity, link a card with international payments enabled, add funds to your balance, buy a plan on the Coding Plan page, and finally get the key from your subscriptions section. The plan has a special key, and it’s easy to confuse it with an ordinary platform key—checking the difference takes a second.

  1. Choose the platform before registering

    The international and Chinese platforms are different worlds, with different accounts, currencies, and server endpoints. The international platform uses dollars, and the plan costs $50. The Chinese platform uses yuan, and the same plan costs 200 yuan. The accounts aren’t linked, and their keys don’t work across platforms.

  2. Register and verify your identity

    The phone country code must match the country you selected for your account. You can’t change the country later. During identity verification, the country on your identity document must also match the account country. This mismatch is the most common reason for rejection.

  3. You need a Visa, Mastercard, AMEX, or JCB card with international payments enabled. The platform will place a one-dollar preauthorization, so the card must have at least that amount available as a balance or credit limit. A charge marked ALI*ALICLOUD will then appear on your statement, and you’ll need to enter the exact amount in the form. You get five attempts.

  4. Add funds to your balance

    Alibaba uses a balance: you link a card, add funds to the account, and charges are taken from there. Renewal itself is charged to the linked payment method, so the card must still be active and funded by the next charge date. If the card stops working, the subscription won’t renew.

  5. Buy a plan

    The Coding Plan purchase page is in the Model Studio console. An account can have only one Coding Plan subscription at a time.

  6. Get the key

    The key appears in your subscriptions section and starts with sk-sp-. An ordinary platform key looks different: it starts with sk- followed immediately by other characters. If the key you have doesn’t include sp, it’s for a different product and won’t work with the plan.

The technical details after payment—installation, editor setup, and troubleshooting—are covered in a separate article about Qwen Code as a Claude Code replacement; here I’m only covering the money.

Why can’t you sometimes buy the plan at all?

Key takeaway

The number of plan seats is limited, and they’re sold on a first-come, first-served basis. New seats are added once a day at midnight China time. At times the plan stays sold out for weeks, and that has nothing to do with your card or country.

Alibaba acknowledges the limit on its own plan page: the number of seats is limited, they’re available on a first-come, first-served basis, and new seats are added daily at midnight UTC+8.

On the Chinese platform, the time is different: half past nine in the morning in China.

Alibaba hasn’t given an official explanation.

Plan for the possibility that you won’t be able to buy it today. If you need access right now, the alternatives are direct pay-as-you-go through Alibaba or a third-party model provider. The article on how to get a Qwen Code API key explains where to create a key for that kind of access and how much usage costs.

You paid, but Qwen Code returns 401: where is access getting stuck?

Key takeaway

The most common complaint after a purchase is that the money is gone but the program says the token is invalid. There are three causes: a key for one product was entered with another product’s endpoint, the key was issued in one region but the request is going to another, or an ordinary platform key was used instead of a plan key. All three cases produce the same error, and its expired-token message is misleading.

It’s straightforward if you know the pairs. A key and endpoint only work together:

What you boughtKey formatEndpoint
Coding Plan, internationalsk-sp-...https://coding-intl.dashscope.aliyuncs.com/v1
Coding Plan, Chinesesk-sp-...https://coding.dashscope.aliyuncs.com/v1
Pay-as-you-go, Singaporesk-...The endpoint for your Singapore workspace, shown next to the key in the console

If you want to keep using Claude Code and just give it an Alibaba model, the plan has its own endpoint for that: the same international endpoint, with /apps/anthropic at the end.

The environment variable for the plan is called BAILIAN_CODING_PLAN_API_KEY:

export BAILIAN_CODING_PLAN_API_KEY="sk-sp-your-key"
export OPENAI_BASE_URL="https://coding-intl.dashscope.aliyuncs.com/v1"

There’s no longer a separate sign-in command for the plan in the program. The easiest option is to paste both lines directly into the terminal before starting qwen; they work as long as the window is open. To avoid entering them every time, add them to the end of ~/.zshrc on Mac or ~/.bashrc on Linux. The /auth menu does the same thing through a dialog if you’d rather not use the terminal.

The second reason for rejection is the region: keys can’t be moved between regions.

Each region has its own access domain, key, and model list. They can’t be used across regions.

— Alibaba Cloud Model Studio, regions section, https://www.alibabacloud.com/help/en/model-studio/regions/

There are six regions: Beijing, Singapore, Frankfurt, Tokyo, Hong Kong, and Virginia. Buy in one and connect to another, and you’ll get the same token error.

The third cause is more frustrating than the first two. You buy the plan and expect your previous sign-in through your Qwen account to start working again. It won’t: the old sign-in method was shut down entirely, while the plan works independently and can only be activated with a key.

The quickest way to check that your payment went through is with one request: a new key and the correct endpoint. If you get a normal response, the funds are there. The total remaining quota is visible on the plan page in the console. But there’s no per-model breakdown or token bill—that’s a gap: you can see how much is left but not which model used it up. I won’t pretend that’s fine.

Where can money be spent without an error?

Key takeaway

If you enter an ordinary platform key and an endpoint without the word coding, the program won’t show an error; requests will simply be billed pay-as-you-go instead of using your purchased subscription. Charges are taken from your account balance, billing data can be delayed by up to an hour, and there’s no upper limit on your debt.

The trap gives no sign that anything is wrong—that’s what makes it dangerous. Everything works, responses come back, and you’re sure you’re using the quota you paid for.

If you configure the tool with an ordinary key in the sk-xxx format and an ordinary endpoint that doesn’t contain the word coding, the system recognizes those requests as pay-as-you-go and bills them accordingly.

— Alibaba Cloud, Coding Plan FAQs, https://www.alibabacloud.com/help/en/model-studio/coding-plan-faq

What to do:

  1. Check the key and endpoint together before the first request. The key starts with sk-sp-, and the endpoint contains coding. Either one without the other means something is wrong.
  2. Do not treat the account balance as a spending cap. The delayed billing and debt described above mean charges can exceed the visible balance. This article has not established a documented hard pay-as-you-go cap; do not start an unattended PAYG run on the assumption that an empty balance will stop it.
  3. Check your bill manually during the first week. Usage details can be downloaded from invoices; they aren’t in the console.

Keeping a small balance may reduce prepaid exposure, but it does not cap usage charges or resulting debt. Verify the exact plan key and endpoint before sending requests; if you cannot establish a hard spending boundary for PAYG, stop that run rather than relying on the balance.

A separate note about the message “Access denied. Please ensure your account is in good standing.” That’s what the system says when you’re in debt or have run out of funds in your balance.

Account closure and refund terms

There’s also the platform’s own user agreement. The agreement gives the company the right to close an account, and under its terms, as of the date of this article, no refund is provided for the remaining paid subscription period. Alibaba refunds the remaining account balance, but only by bank transfer through a support request; it takes 30 to 45 business days, and bank fees are at your expense.

I won’t advise you on what exactly to pay with. I’ll only say what the documentation shows: the payment must be made with a card from the accepted list and with international payments enabled. Account settings won’t get around that.

How can you pay if your card still won’t go through?

Key takeaway

Qwen Code has built-in support for third-party model providers. This route is provided by the program itself and described in its documentation. The other option, with no payment at all, is running models on your own hardware.

The Qwen Code documentation lists model providers the program understands without configuration, including DeepSeek, MiniMax, Z.ai, Idealab, and ModelScope. It also supports any compatible service’s custom endpoint and local models through Ollama or vLLM.

Each provider’s payment terms are different and described in its documentation.

Running models locally removes the payment question entirely. Qwen’s open weights are freely available; you can run a model on your own machine and don’t need external access. The obvious limitation is that you need a graphics card, and larger models won’t run on ordinary consumer hardware. The article on what Qwen 3.7 Max can do explains what each version can do and which weights are available.

Another option is to stay with Claude Code but switch it to an Alibaba model. Claude Code can connect to third-party models using the Anthropic protocol, and the Qwen plan has a separate endpoint for that.

How much do neighboring tools in the same class cost?

Key takeaway

At $50, Qwen Coding Plan now costs more than Claude’s $20 subscription, which is an awkward fact: Qwen used to be the cheapest option here.

Prices as of August 22, 2026.

ProductPlanPrice per month
Qwen Coding PlanPro$50
Qwen Token PlanTeam Standard$30 per seat
ClaudePro$20
ClaudeMaxFrom $100

Pay-as-you-go prices per million tokens:

ModelInputOutput
deepseek-v4-flash$0.20$0.40
qwen3-coder-next$0.30$1.50
qwen3.7-plus$0.40$1.60
GLM-4.7$0.60$2.20
qwen3-coder-plus$1.00$5.00
Claude Sonnet 5$2.00$10.00
Claude Sonnet 4.5$3.00$15.00
Claude Opus 5$5.00$25.00

A qualification to this table is needed to avoid a misleading comparison. Claude models starting with Opus 4.7 count tokens using a new scheme: the same text produces about 30% more tokens, according to Anthropic’s documentation. That means Claude looks cheaper in a direct price comparison than it will on the bill. I haven’t seen this adjustment in any comparison.

One more thing I’ve learned from working with cheap models: the bill matters more than the price per token. A model that costs half as much but rewrites the same file three times ends up costing more. You have to calculate the final monthly bill; you won’t see it in the price list.

What else do people ask about buying Qwen?

Key takeaway

I’ve collected the questions that come up most often: buying a ready-made account, getting a refund, the difference between the international and Chinese platforms, remaining quota, and where to get a key. Short answers based on Alibaba’s documentation, without promising that the same thing will work for you.

Frequently asked questions

How do you buy an API key for Qwen Code?

The key isn’t sold separately. It appears in your subscriptions section after you buy a Coding Plan and starts with sk-sp-. For pay-as-you-go, you create a key in the Model Studio console without a subscription, but it’s a different key and endpoint. Offers to “sell a Qwen key” outside the platform are for someone else’s key on someone else’s account; it will work only until the first time it’s unlinked.

What if I buy a ready-made account with a subscription?

According to the platform’s documents, one card can be linked to one account, and the agreement gives Alibaba the right to close an account altogether. The seller of a ready-made account still has the email and payment method, so they can take back access any day; any refund of the remaining balance goes to the owner of the linked card, not you. You can’t get your money back on such a purchase.

Which payment networks does Alibaba list?

Visa, Mastercard, AMEX, UnionPay, JCB, Discover, and Diners Club are listed; the available set depends on the legal entity with which the agreement was made.

Will a virtual card work?

The documentation explicitly excludes virtual and prepaid cards. Advice to pay with a virtual card contradicts the platform’s official requirement.

Can I buy the Chinese version of the plan?

The Chinese support section says the plan on the Chinese platform isn’t region-restricted and is available to overseas users. You need a separate account on another website, with its own requirements.

Will I get my money back if it doesn’t work out?

The remaining account balance is refunded by bank transfer through a support request. It takes 30 to 45 business days, and bank fees are at your expense. The paid subscription period is not refunded if the platform closes the account at its own initiative, according to the agreement.

What happens when the monthly quota runs out?

Everything stops with an error. There’s no automatic switch to pay-as-you-go; you have to wait for the reset or buy an additional package.

Why do I still get a 401 after payment?

Alibaba itself lists three causes: an ordinary key instead of a plan key, an expired subscription, or a key that was truncated or contains extra spaces. The English version of the help page lists a fourth: an incorrect server endpoint.

Where can I see how much is left?

The total remaining plan quota is visible on its page in the console. There’s no per-model breakdown or token bill there; usage details are downloaded from invoices. Free-quota usage is shown separately for each model.

One last warning.

Comments with links to third-party access resellers regularly appear in the tracker under complaints that have gone unanswered. They look like a solution from someone who knows what they’re doing. A random person’s comment and a response from the project developer are two different things; you can tell them apart by the gray badge next to the name, which GitHub adds automatically for the project team. I don’t link to resellers on principle: if anything goes wrong, there’ll be no one to complain to.

Where to start

Key takeaway

The order is: start with the free one-million-token starter quota, then decide on a payment method, check your card, and only then buy a plan. The starter quota is enough to find out whether the tool is for you; you don’t need a card for that step.

  1. Get the starter quota

    Create an account on the international platform and activate Model Studio in the Singapore region. You get one million tokens per model for up to 90 days, with no card required. That’s enough to find out whether Qwen can handle your tasks.

  2. Decide how much you’ll actually use it

    If you make more than around 150 requests a day, calculate the subscription cost. If you make fewer, pay-as-you-go will be cheaper, and you won’t have to think about quotas at all.

  3. Check your card before buying a plan

    Your card must be on the accepted list and have international payments enabled. If the one-dollar preauthorization fails, there’s no point buying the plan; the payment simply won’t go through.

  4. If the card doesn’t work, use a provider or go local

    The program supports third-party providers out of the box. Running models locally eliminates the cost question entirely, but depends on your hardware.

  5. After payment, check the key and endpoint pair

    The key starts with sk-sp-, and the endpoint contains the word coding. This check helps prevent a plan/PAYG mismatch; it is not a hard cap on spend or proof that every request will succeed.

Paying is only half the job. Whatever model you choose, the result depends on what you put in its context before making a request. For a comparison of the tools, see what to code with in 2026: 8 AI tools.

Get to know Ailoot.

More details

Questions about Qwen Code: plans, payment requirements, and key formats

Does a small Alibaba Cloud balance cap pay-as-you-go losses?

No. Under the billing behavior described here, delayed charges and debt can exceed the visible balance. This article does not establish a hard PAYG spending cap; do not treat a small balance or periodic invoice checks as one.

What should I check before using purchased Coding Plan quota?

Confirm the plan-specific key and its matching regional Coding Plan endpoint together. An ordinary platform key with an ordinary endpoint can use pay-as-you-go billing instead; a successful model response alone does not prove which balance was charged.

All articles