Qwen AI API Pricing: Real Token Math and a Cheaper Route
If you are looking at qwen ai api pricing, the useful number is cost per finished job, not the headline rate. Here is how to work it out, with exact math for an OpenAI-compatible endpoint at $0.15 per 1M input tokens and $0.50 per 1M output tokens.
Updated

Key points
- Price is $0.15 per 1M input tokens and $0.50 per 1M output tokens, billed from prepaid credit.
- A typical short chat exchange costs a fraction of a cent: $0.00055 for 2,000 tokens in and 500 out.
- There is no free unlimited tier. New users get a one-click $0.50 trial valid for 7 days, no card needed.
- Top-ups run from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200.
The short answer
This site does not resell the official Alibaba service, so it cannot quote you that price list. What it offers is a hosted, OpenAI-compatible text API running one open-weight model that is tuned to answer without content refusals for lawful adult use. The meter is simple: $0.15 per 1M input tokens and $0.50 per 1M output tokens. If you came here asking about qwen ai api pricing from the vendor side, open their pricing page and compare it against the formulas below, because those rates change and depend on the model size and region you pick.
One million input tokens plus one million output tokens costs $0.65 in total: $0.15 plus $0.50. Everything else in this article is arithmetic on those two numbers. You pay only for tokens that were actually processed. Failed or refused requests are not charged, and credit never expires, so an unused balance simply waits for you.
The one thing you will not find is a free unlimited plan. The API has no subscription and no monthly seat fee. You prepay credit, you spend it, and the balance is visible in the X-Balance-USD response header on every call.
How token billing works
A token is a chunk of text, usually a short word or a piece of a longer one. Your request is billed in two parts. Input tokens are everything you send: the system prompt, the conversation history, any documents you paste in, and the tool definitions if you use tool calling. Output tokens are what the model writes back. Output costs more per token than input, which is why a chatty model with a long reply drives the bill more than a long prompt does.
The context window is 100,000 tokens, counting prompt and completion together. That means a request with 99,000 tokens of input leaves room for about 1,000 tokens of reply. The max_tokens parameter is optional. If you leave it out, the completion can use whatever is left of the window, so set it yourself when you know replies should be short.
Chat apps have one habit that surprises people: every turn resends the whole history. The model has no memory between calls, so your client sends the earlier messages again, and you pay input price on them each time. Short exchanges stay cheap, but a long session grows slowly in input cost. The worked examples below include one of these sessions so you can see the shape of it.
Where to read the numbers
Each response carries a usage object with prompt and completion token counts, and a streamed response sends usage at the end. Log those two numbers per request and multiply by the rates. You do not need to estimate token counts by eye once you have a day of real traffic.
Worked examples at $0.15 and $0.50
The formula is input tokens times 0.15 divided by 1,000,000, plus output tokens times 0.50 divided by 1,000,000. Here are five jobs, each computed exactly.
| Job | Input tokens | Output tokens | Cost |
|---|---|---|---|
| Short chat reply | 2,000 | 500 | $0.0003 + $0.00025 = $0.00055 |
| Retrieval answer with pasted context | 12,000 | 600 | $0.0018 + $0.0003 = $0.0021 |
| Summary of a near-full window | 99,000 | 1,000 | $0.01485 + $0.0005 = $0.01535 |
| 20-turn chat session (history resent) | 86,000 | 6,000 | $0.0129 + $0.003 = $0.0159 |
| Batch of 10,000 documents | 30,000,000 | 3,000,000 | $4.50 + $1.50 = $6.00 |
The 20-turn session deserves a note. Assume a 500-token system prompt, and each turn adds 100 tokens from the user and 300 from the model. Turn one sends 500 tokens, turn two sends 900, and so on up to 8,100 on turn twenty. Add them up and you get 86,000 input tokens, plus 20 replies of 300 tokens for 6,000 output. That is about 1.6 cents for a whole evening of conversation.
The batch row shows scale. Ten thousand documents of 3,000 tokens each, with a 300-token summary per document, come to 30M input and 3M output. Input is $4.50, output is $1.50, total $6.00. If you plan something similar, run twenty documents first, read the real usage numbers, and multiply.
What a top-up buys
Credit is prepaid. You can add any whole amount from $20 to $500, and larger top-ups carry a bonus on the credit you receive. Crypto (USDT on TRC20, USDC on Base) is accepted.
| You pay | Bonus | Credit you get |
|---|---|---|
| $20 | none | $20.00 |
| $50 | +5% | $52.50 |
| $100 | +10% | $110.00 |
| $200 | +15% | $230.00 |
| $500 | +15% | $575.00 |
To make $20 concrete: at $0.00055 per short chat exchange, it covers roughly 36,000 of them. Since the credit never expires, there is no deadline to spend it by, and a balance you do not touch costs you nothing.
Current plans and any updates to the bonus tiers are listed on the pricing page.
No free unlimited tier, and what the trial gives you
Searches for this topic often hunt for a free or unlimited Qwen API. Be wary of anything that promises both, because running a large model costs real GPU time and somebody pays for it. Here, the position is stated openly: nothing is unlimited, and nothing is free beyond the trial.
The trial is $0.50 of credit. After you sign up with Google, or with email and password, open the API key page and claim it with one click. It needs no card, it is limited to one per person, and it is valid for 7 days. At $0.00055 per short chat exchange, $0.50 covers about 900 of them, which is plenty to test streaming, tool calling and JSON mode against your own code. Trial keys have lower limits than full keys: 2 concurrent requests and 60 requests per minute, against 8 concurrent and 300 per minute on a full key.
Start from the API key page, then follow the quickstart in the docs to send your first request.
Comparing this with other Qwen API pricing
Comparing price lists is harder than it looks, because vendors package tokens differently. When you line up another provider against these rates, check the following, and write each answer down before you decide.
- Is the rate per 1M tokens, per 1,000 tokens, or per request?
- Are input and output priced separately, and is there a different tier for long prompts?
- Does the model produce hidden reasoning tokens that count as output?
- Is there a free quota, and does it expire or require a region or an identity check?
- Is there a minimum top-up, a monthly fee, or a rate limit that forces a higher plan?
Then compute a blended rate for your own traffic. If 80% of your tokens are input and 20% are output, the blended price here is 0.8 times $0.15 plus 0.2 times $0.50, which is $0.12 plus $0.10, or $0.22 per 1M tokens. Do the same with the other provider's numbers. We do not quote anyone else's rates here; check their current pricing and run the same sum.
Price is not the only axis. This API has one model, text only: no image, audio or video, no embeddings and no fine-tuning. If you need those, a broader vendor platform may fit better. If what you need is a plain chat completions endpoint that answers without content refusals for lawful adult use, the narrower service is usually cheaper and simpler. For model-specific notes, see the Qwen 3 API guide on this site.
Keeping the bill low
Most savings come from sending fewer input tokens, not from switching providers. These habits cost nothing.
- Trim history. Keep the last several turns verbatim and replace older turns with a short summary you write once.
- Set
max_tokens. If a reply should never exceed 300 tokens, say so in the request. A runaway reply is billed at the higher output rate. - Use
stopsequences. They end generation at a marker you choose. - Do not resend big static prompts unnecessarily. A 4,000-token system prompt costs $0.0006 on every call. Across 100,000 calls that is $60, so shorten it if you can.
- Watch the balance header.
X-Balance-USDtells you what is left after each call, so a simple alert at a threshold of your choice prevents surprises.
The $60 figure is straightforward: 4,000 tokens times $0.15 per 1M is $0.0006, and 100,000 calls at that price is $60. A prompt that is half as long halves it.
More guides
Questions and answers
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Is there a free Qwen API with no limits?
- Not here. New users can claim a $0.50 trial with one click on the API key page, valid for 7 days and without a card. After that, the service is pay as you go from prepaid credit starting at $20.
How much does 1M tokens cost?
- One million input tokens cost $0.15 and one million output tokens cost $0.50. A job that uses both in equal amounts costs $0.65.
Is this the official Alibaba Qwen API?
- No. It is an independent OpenAI-compatible host running one open-weight model, and it is not the official API of any model vendor. For the vendor's own rates, check their current pricing.
Do failed requests cost anything?
- No. Failed or refused requests are not charged, and prepaid credit never expires.
Can I pay with crypto?
- Yes. You can top up with USDT on TRC20 or USDC on Base. Any whole amount from $20 to $500 works.