Qwen API Pricing (2026): Every Model, Region, and Discount Explained
Qwen API pricing on Alibaba Cloud Model Studio (Singapore, international) starts at $0.03 per 1M input tokens for qwen3.7-flash on short prompts. The flagship qwen3.8-max costs $2.00 input and $6.00 output per 1M tokens, and qwen3.7-plus lists at $0.40 / $1.60 (currently 20% off). Rates change by region, request size, and mode: the same qwen3.8-max lists at $1.65 / $4.951 under Global deployment. Batch calls cost 50% of real-time on supported models. Figures are from the official Model Studio pricing page (last updated Oct 19, 2026), checked on October 20, 2026.
This guide covers the current Max, Plus, Flash, Coder, open-weight (QwenLM on GitHub), and VL prices, how tiered pricing and caching work, a worked cost example, a comparison with other providers, and OpenAI-compatible code for calling Qwen directly or through one Flatkey key.
Qwen API pricing at a glance (per 1M tokens)
Singapore region, International deployment, standard real-time rates, October 20, 2026 (source):
| Model | Prompt size per request | Input | Output | Notes |
|---|---|---|---|---|
qwen3.8-max |
up to 1M | $2.00 | $6.00 | Flagship; thinking and non-thinking |
qwen3.7-max |
up to 1M | $2.50 | $7.50 | Previous flagship |
qwen-max |
flat | $1.60 | $6.40 | Legacy; 50% batch discount |
qwen3.7-plus |
up to 256K | $0.40 | $1.60 | List price; limited-time 20% off |
qwen3.7-plus |
256K–1M | $1.20 | $4.80 | List price; limited-time 20% off |
qwen3.6-plus |
up to 256K | $0.50 | $3.00 | |
qwen3.5-plus |
up to 256K | $0.40 | $2.40 | |
qwen3.8-flash |
up to 1M | $0.15 | $0.47 | Newest Flash |
qwen3.7-flash |
up to 32K | $0.03 | $0.13 | Cheapest short-prompt option |
qwen3.7-flash |
32K–256K | $0.10 | $0.40 | |
qwen3.7-flash |
256K–1M | $0.20 | $0.80 | |
qwen3.5-flash |
up to 1M | $0.10 | $0.40 | |
qwen3-coder-flash |
up to 32K | $0.30 | $1.50 | Rises to $1.60 / $9.60 above 256K |
qwen3.8-27b (open weight) |
up to 1M | $0.50 | $3.00 | |
qwen3-vl-plus |
up to 32K | $0.20 | $1.60 | Vision-language |
New Singapore accounts get 1 million free tokens per model, valid for 90 days from activation or model release, whichever is later. Alibaba Cloud states that free quota is offered only in Singapore.
Global vs International vs US deployment: why the same model has two prices
Model Studio sells the same model under different deployment scopes, and the price depends on where inference runs:
| Model | Singapore (International) | Global scope (US, EU, JP, HK regions) | US scope (Virginia) |
|---|---|---|---|
qwen3.8-max |
$2.00 / $6.00 | $1.65 / $4.951 | $2.00 / $6.00 |
qwen3.7-plus (≤256K, list) |
$0.40 / $1.60 | $0.276 / $1.101 | $0.40 / $1.60 |
qwen3.8-flash |
$0.15 / $0.47 | $0.113 / $0.382 | $0.15 / $0.47 |
qwen3.7-flash (≤32K) |
$0.030 / $0.130 | $0.028 / $0.110 | $0.030 / $0.130 |
Source: Model Studio pricing, October 20, 2026. Prices are input / output per 1M tokens.
Global-scope prices are roughly 7–31% lower than International or US scope, depending on the model (7% for qwen3.7-flash, 17.5% for qwen3.8-max, 31% for qwen3.7-plus input). The trade-off is data residency, because Global scope can schedule inference outside your selected region. If you need US-only processing, use the US scope and its higher rate. Global-scope qwen3.7-plus in the Hong Kong, Frankfurt, Virginia, and Tokyo regions also carries a limited-time 60% night discount (22:00–08:00 UTC+8) and 20% off during the day.
Tiered pricing: one long prompt reprices the whole request
Model Studio's rule: "All tokens in the request are billed at the unit price of the corresponding tier." A qwen3.7-flash request with 33K input tokens is billed entirely at the 32K–256K rate ($0.10), not at $0.03 for the first 32K tokens. Because the second tier is 3.3x the first, trimming a prompt from 33K to 31K tokens cuts input cost by about 70%.
Caching and batch discounts
| Discount | Rule (Model Studio, Oct 2026) |
|---|---|
| Context cache hit | Billed at 10% of the standard input price (context cache docs) |
| Explicit cache creation | Billed at 125% of the standard input price |
| Batch inference | 50% of real-time input and output prices, on models marked as batch-eligible (batch API docs) |
| Stacking | Cache and batch discounts can't be combined on the same request |
Explicit caching pays off after a single cache hit: you pay 125% once to create the cache, then 10% on each later read instead of 100%. For a repeated 20K-token system prompt on qwen3.8-max, the first call costs $0.05 in input, and each cache hit after that costs $0.004 instead of $0.04.
Worked cost example
A RAG assistant on qwen3.8-max (Singapore): 200,000 requests a month, each with 12K input tokens (8K of them a cached prefix) and 600 output tokens.
| Line item | Calculation | Cost |
|---|---|---|
| Uncached input | 800M tokens × $2.00 | $1,600 |
| Cached input (10%) | 1,600M tokens × $0.20 | $320 |
| Output | 120M tokens × $6.00 | $720 |
| Total | $2,640 |
The same traffic on Global-scope qwen3.8-max comes to about $2,178. On qwen3.8-flash (Singapore) it comes to about $200 ($120 + $24 + $56.40), roughly 13x cheaper, if Flash meets your quality bar.
QWEN = { # Singapore International list prices per 1M tokens, Oct 20, 2026
"qwen3.8-max": (2.00, 6.00),
"qwen3.7-plus": (0.40, 1.60), # <=256K tier
"qwen3.8-flash": (0.15, 0.47),
}
def qwen_cost(model, uncached, cached, output, batch=False):
inp, out = QWEN[model]
if batch: # batch and cache discounts don't stack
return (uncached + cached) / 1e6 * inp * 0.5 + output / 1e6 * out * 0.5
return uncached / 1e6 * inp + cached / 1e6 * inp * 0.10 + output / 1e6 * out
print(qwen_cost("qwen3.8-max", 800e6, 1600e6, 120e6)) # 2640.0
Qwen vs other model APIs
List prices per 1M tokens, October 20, 2026. Qwen rates are from Model Studio (Singapore); other rates are from the linked Flatkey model pages.
| Model | Input | Output |
|---|---|---|
qwen3.8-max |
$2.00 | $6.00 |
gpt-6-sol |
$2.00 | $10.00 |
claude-sonnet-5-5 |
$2.00 | $10.00 |
kimi-k3 |
$3.00 | $15.00 |
glm-5.3 |
$1.40 | $4.40 |
qwen3.8-flash |
$0.15 | $0.47 |
gpt-6-luna |
$0.10 | $0.50 |
claude-haiku-5-5 |
$0.10 | $0.50 |
qwen3.8-max matches GPT-6 Sol and Claude Sonnet 5.5 on input but charges 40% less for output. For a broader view, see the DeepSeek vs Qwen cost guide and AI API pricing comparison.
Qwen through Flatkey: price and one-key access
Flatkey's catalog lists several Qwen models behind the same OpenAI-compatible endpoint as GPT, Claude, Gemini, DeepSeek, and Kimi. Prices on the Flatkey model pages as of October 20, 2026:
| Model | Flatkey input | Flatkey cached | Flatkey output | Shown list price |
|---|---|---|---|---|
qwen3.8-max |
$1.60 | $0.20 | $4.80 | $2 / $0.25 / $6 (−20%) |
qwen3.7-plus |
$0.32 | $0.064 | $1.28 | $0.40 / $0.08 / $1.60 (−20%) |
qwen3.8-flash |
$0.12 | $0.0128 | $0.376 | $0.15 / $0.016 / $0.47 (−20%) |
qwen3.5-flash |
$0.08 | n/a | $0.32 | $0.10 / $0.40 (−20%) |
The qwen3.8-max page also reports 98.9% average provider uptime and 1.78s average latency over the last 30 days. Flatkey prices and promotions change, so check the pricing page before you commit a budget.
How to call the Qwen API (OpenAI-compatible)
Option A: direct Model Studio
Create an API key in the Model Studio console in the same region as the endpoint you'll call. A key from another region is rejected, and the error looks like an ordinary authentication failure. The base URL depends on region and workspace (base URL docs). The US (Virginia) endpoint, for example, is https://dashscope-us.aliyuncs.com/compatible-mode/v1.
curl https://dashscope-us.aliyuncs.com/compatible-mode/v1/chat/completions \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "qwen3.8-flash", "messages": [{"role": "user", "content": "Hello"}]}'
Option B: Flatkey (one key for Qwen and every other model)
curl https://router.flatkey.ai/v1/chat/completions \
-H "Authorization: Bearer $FLATKEY_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "qwen3.8-max", "messages": [{"role": "user", "content": "Write a haiku about caching."}]}'
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["FLATKEY_API_KEY"], base_url="https://router.flatkey.ai/v1")
# Same client, same key: switch Qwen tiers or providers by changing one string.
for model in ["qwen3.8-flash", "qwen3.8-max", "claude-sonnet-5-5"]:
r = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "Classify: 'refund not received' -> billing|tech|other"}],
)
print(model, r.usage.prompt_tokens, r.usage.completion_tokens, r.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.FLATKEY_API_KEY, baseURL: "https://router.flatkey.ai/v1" });
async function withFallback(prompt) {
for (const model of ["qwen3.8-max", "gpt-6-sol"]) {
try {
const r = await client.chat.completions.create({ model, messages: [{ role: "user", content: prompt }] });
return `${model}: ${r.choices[0].message.content}`;
} catch (err) {
console.warn(model, "failed:", err.status);
}
}
throw new Error("all routes failed");
}
console.log(await withFallback("Name three Qwen model tiers."));
See the Flatkey quickstart for key creation, and the OpenAI API base URL guide for SDK configuration.
Direct Model Studio or a router?
| Question | Direct Model Studio | Flatkey router |
|---|---|---|
| Lowest possible Qwen price | Global scope plus night discounts | Flat discounted rate, no region choice |
| Data-residency control | Choose region and scope | Ask about routing region |
| Number of keys | One per region | One for all supported models |
| Other providers | Separate accounts | Same key and balance |
| Fallback | Build it yourself | Change the model string |
Still choosing between the two labs? Our DeepSeek vs Qwen comparison covers models, open weights, and October 2026 API prices.
FAQ
How much does the Qwen API cost?
As of October 20, 2026 (Singapore, International), qwen3.8-max costs $2.00 input and $6.00 output per 1M tokens, qwen3.7-plus lists at $0.40 / $1.60, qwen3.8-flash costs $0.15 / $0.47, and qwen3.7-flash starts at $0.03 / $0.13 for prompts up to 32K tokens.
Is there a free Qwen API tier?
Yes, in the Singapore region only: 1 million free tokens per model, valid for 90 days. Other regions have no free quota.
Why does Qwen have different prices for the same model?
Prices depend on region and deployment scope. Global scope is cheaper but can process requests outside your chosen region. International and US scopes cost more and keep processing within their geography.
Does Qwen offer batch pricing?
Yes. Batch-eligible models cost 50% of the real-time price for both input and output. The batch discount can't be combined with cache discounts.
Is the Qwen API OpenAI-compatible?
Yes. Model Studio exposes compatible-mode/v1 endpoints (OpenAI compatibility docs), so you can use the OpenAI SDK by changing the base URL, key, and model name. You can also call Qwen models through Flatkey's https://router.flatkey.ai/v1.
What is the cheapest Qwen model?
qwen3.7-flash at $0.03 input and $0.13 output per 1M tokens (Singapore) for prompts up to 32K tokens. Under Global scope it is $0.028 / $0.110.
Bottom line
Budget $2 / $6 per 1M tokens for qwen3.8-max and $0.15 / $0.47 for qwen3.8-flash on Singapore list prices. Global scope is roughly 7–31% cheaper if residency allows it, and batch halves the price. Re-check the official pricing page before you commit. To run Qwen next to GPT, Claude, and Gemini with one key, use Flatkey's Qwen routes.
Last updated: October 20, 2026 · Flatkey Team. Prices are in USD and quoted from the official sources linked inline.



