EN ▾

Qwen Coder API Pricing and a Prepaid Alternative

Updated

There is no single price for Qwen coder API access, because the cost depends on who serves the model and how they bill. This page explains how to estimate it and prices a prepaid alternative exactly.

Key points

  • Check each provider's current pricing page for Qwen models; rates and model names change.
  • This service is not the official Qwen API; it runs one open-weight model, ID uncensored.
  • Rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens, prepaid, no subscription.
  • A typical coding request with 20,000 input and 1,500 output tokens costs $0.00375.
Balance scale weighing token cubes against coins, illustrating per-token API pricing for code models

Why Qwen coder pricing has no single answer

When people ask about qwen coder api pricing, they usually want one number per million tokens. The honest answer is that Qwen is a family of open-weight models, and many companies serve them. Each one sets its own price, its own model names, its own limits and its own billing rules. Some charge differently for input and output, some have tiers by context length, and some offer discounts for cached prompts. Prices also move, so any figure copied into an article goes stale. Check each provider's current pricing page before you plan a budget.

What you can do reliably is learn the shape of the bill, because every per-token service charges the same way: tokens in, tokens out, each multiplied by a rate. Once you know your typical request size, you can compare providers in a few minutes with a spreadsheet. The sections below build that method and then apply it to the service on this site.

A clear disclosure first. This site is not the official Qwen API, and it is not run by the vendor behind Qwen or any other model family. It sells access to one open-weight model, run by an independent provider and tuned to answer without content refusals for lawful adult use. The model ID is uncensored. If you need a specific Qwen coder checkpoint by name, this is not the place to get it; use a provider that lists that model. If you want an OpenAI-compatible endpoint with simple prepaid billing, read on.

The formula behind every token bill

The cost of one request is:

cost = (input_tokens / 1,000,000) x input_rate + (output_tokens / 1,000,000) x output_rate

For this service, input_rate is $0.15 and output_rate is $0.50. Output is more than three times the price of input, so a chat that produces long answers costs more than one that reads a lot and replies briefly. For coding work the balance usually tilts the other way: you paste files and error logs (large input) and get a patch or a short explanation (small output).

Three things inflate input beyond what you typed. A system prompt is sent on every call. Chat history is resent each turn, so a long session grows quadratically in total input. And tool definitions count as input too, since they are part of the prompt. Reasoning-style models can also generate hidden thinking text that is billed as output on many services; check how your provider reports that. On this service the response includes usage, and streamed responses report it at the end, so you can measure your real numbers in a day instead of guessing.

Worked examples at $0.15 and $0.50 per 1M

The table uses four request sizes. Each total is input cost plus output cost, computed from the rates above.

ScenarioInput tokensOutput tokensInput costOutput costPer request
Short question2,000500$0.0003$0.00025$0.00055
Code review of a file20,0001,500$0.003$0.00075$0.00375
Large context refactor90,00010,000$0.0135$0.005$0.0185
Agent loop, 10 steps150,000 total8,000 total$0.0225$0.004$0.0265

Check one row by hand. The code review row: 20,000 / 1,000,000 = 0.02, and 0.02 x $0.15 = $0.003. Then 1,500 / 1,000,000 = 0.0015, and 0.0015 x $0.50 = $0.00075. Adding them gives $0.00375. At 1,000 reviews per month that is $3.75.

The large-context row shows the ceiling. The context window is 100,000 tokens for the prompt and completion together, so a request that fills it with 90,000 input and 10,000 output costs $0.0185. Even a maximal call is under two cents.

Now a monthly view. A small team that sends 5M input tokens and 1M output tokens in a month pays 5 x $0.15 + 1 x $0.50 = $0.75 + $0.50 = $1.25. A heavier workload with 50M input and 10M output pays 50 x $0.15 + 10 x $0.50 = $7.50 + $5.00 = $12.50. The numbers are small because the rates are small, and your main risk is not the rate but a loop that runs unattended.

How prepaid billing works here

You add credit first and each request draws it down. There is no subscription, no monthly minimum and no expiry on the balance. Failed or refused requests are not charged. Each response carries an X-Balance-USD header, so your code can watch the remaining credit without opening a dashboard.

Top-ups are any whole amount from $20 to $500, paid by crypto (USDT on TRC20, USDC on Base). Larger top-ups add a bonus to the credit you receive:

Top-upBonusCredit received
$20none$20.00
$50+5%$52.50
$100+10%$110.00
$200+15%$230.00
$500+15%$575.00

What does $20 buy? Using the short-question scenario at $0.00055 each, $20 covers 36,363 requests. Using the code-review scenario at $0.00375 each, it covers 5,333. Using the $110 from a $100 top-up and the same code reviews, you get 29,333. The pricing page has the current rules in one place.

New users can try the service before paying. After sign-up with Google, or with email and password, one click on the API key page claims $0.50 of trial credit. It needs no payment, is valid for 7 days and is limited to one per person. At $0.00375 per code review, $0.50 covers 133 reviews; at $0.00055 per short question, it covers 909. That is enough to judge whether the answers fit your use.

Calling it from a coding tool

The API is OpenAI-compatible, so editors and scripts that let you set a custom endpoint can use it. You need three values: base URL, key and model ID. The example measures a real request so you can replace the estimates above with your own numbers.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.qwencoder.top/v1",
    api_key="YOUR_API_KEY",
)

resp = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "user", "content": "Write a Python function that parses ISO 8601 dates."}
    ],
)

u = resp.usage
cost = u.prompt_tokens / 1_000_000 * 0.15 + u.completion_tokens / 1_000_000 * 0.50
print(u.prompt_tokens, u.completion_tokens, round(cost, 6))

Run that on ten representative prompts and average the result. Multiply by your expected daily call count. That is a better budget than any price list.

Be realistic about fit. The service gives you text chat, tool calling, JSON mode and streaming. It does not generate images or audio, create embeddings, or fine-tune models. Quality on code is whatever this one model delivers, and the site makes no benchmark claims, so test it on your own tasks. If you already compared other providers, the Gemma API alternatives page covers a similar cost comparison, and the docs have the full request reference.

A checklist for comparing any coder API

  • Exact model name. Confirm the provider serves the checkpoint you want, not a similarly named one.
  • Input and output rates. Write both down per 1M tokens, plus any tier by context length.
  • Caching and reasoning charges. Ask whether cached prompts are discounted and whether hidden reasoning tokens are billed.
  • Limits. Here a full key allows 8 concurrent requests and 300 per minute; a trial key allows 2 and 60. Compare against your peak parallelism.
  • Context window. 100,000 tokens here, shared by prompt and completion.
  • Failure billing. Here, failed or refused requests are free.
  • Data handling. Prompts here are not used for training; check the same for others.
  • Payment and expiry. Does credit expire, and which payment methods work for you?

When the answer to the first item is "I need that named Qwen model", pick a provider that lists it. When the answer is "I want an OpenAI-compatible endpoint and predictable prepaid spend", the formula and examples above give you the number in a minute.

Questions and answers

How much does the Qwen coder API cost?

It depends on the provider that serves the model, so check each provider's current pricing. Providers differ in rates, model names and billing rules.

Is this the official Qwen API?

No. It is an independent service that runs one open-weight model under the ID uncensored and is not affiliated with any model vendor.

What does this API cost per request?

Rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens. A request with 2,000 input and 500 output tokens costs $0.00055.

Is there a free trial?

New users can claim $0.50 of trial credit with one click on the API key page. It needs no payment, lasts 7 days and is one per person.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key