LLM API Guide

Qwen API Pricing (2026): Token Rates, Image Costs, and Tier Rules

Official Qwen API pricing on Alibaba Cloud Model Studio as of 2026-10-29: Qwen 3.8 Max, Plus, Flash, open-weight models, and Qwen Image per-image rates.

Editorial illustration: Qwen API Pricing (2026): Token Rates, Image Costs, and Tier Rules
Photo-style image, AI-generated

Summary

  1. Flagship Qwen 3.8 Max costs $2.00 per 1M input tokens and $6.00 per 1M output tokens flat across the entire 1M context window as of 2026-10-29.
  2. Qwen 3.7 Plus bills $0.40/$1.60 per 1M tokens up to 256K input, jumping to $1.20/$4.80 for every token once input passes 256,000 tokens as of 2026-10-29.
  3. Qwen Image 2.1 Turbo costs $0.016 per generated image as of 2026-10-29, while text and multimodal models bill per million tokens.
  4. Context cache hits cost 10% of the standard input rate and Batch API calls get 50% off as of 2026-10-29, but the two discounts cannot be combined.

On Alibaba Cloud Model Studio (International endpoint, ap-southeast-1), Qwen text and multimodal APIs bill per 1 million tokens on a pay-as-you-go basis. The current flagship qwen3.8-max costs $2.00 per 1M input tokens and $6.00 per 1M output tokens flat across its full 1M context window as of 2026-10-29. The workhorse qwen3.7-plus lists at $0.40 input and $1.60 output up to 256K input tokens, and the high-throughput qwen3.8-flash runs $0.15 input and $0.47 output as of 2026-10-29.

If you landed here looking for Qwen 2.1 Turbo at $0.016 as of 2026-10-29, that rate belongs to qwen-image-2.1-turbo, which is Alibaba's image generation model billed per generated image rather than per token. I cover both the token-priced language models and the per-image generation lineup below so you can match the exact model ID in your code to the right rate card.

On this page

Text Generation API Pricing (Max, Plus, and Flash)

Alibaba Cloud splits its proprietary hosted lineup into three main tiers: Max for frontier reasoning and coding, Plus for balanced production workloads, and Flash for high-volume extraction or classification. Output token rates always apply to both the final answer and any internal chain-of-thought tokens generated when thinking mode is enabled.

Model ID Deployment Scope Modes Supported Single-Request Input Tier Input ($ / 1M) Output ($ / 1M) Free Quota (Singapore, 90 Days)
qwen3.8-max International Non-Thinking & Thinking 0 < Token ≤ 1M $2.00 $6.00 1M tokens
qwen3.8-max-0902 International Non-Thinking & Thinking 0 < Token ≤ 1M $2.00 $6.00 1M tokens
qwen3.7-max International Non-Thinking & Thinking 0 < Token ≤ 1M $2.50 $7.50 1M tokens
qwen3.7-max-preview International Thinking mode only 0 < Token ≤ 1M $2.50 $7.50 1M tokens
qwen3.7-plus International Non-Thinking & Thinking 0 < Token ≤ 256K $0.40 (20% off promo) $1.60 (20% off promo) 1M tokens
qwen3.7-plus International Non-Thinking & Thinking 256K < Token ≤ 1M $1.20 (20% off promo) $4.80 (20% off promo) None
qwen3.7-plus-2026-05-26 International Non-Thinking & Thinking 0 < Token ≤ 256K $0.40 $1.60 1M tokens
qwen3.8-flash International Non-Thinking & Thinking 0 < Token ≤ 1M $0.15 $0.47 1M tokens
qwen3.7-flash International Non-Thinking & Thinking 0 < Token ≤ 1M $0.05 $0.20 1M tokens

When qwen3.8-max launched on August 3, 2026, it dropped the flagship rate from qwen3.7-max's $2.50/$7.50 down to $2.00/$6.00 while keeping a flat price across the entire 1M token window. Unless you have a pinned snapshot dependency on qwen3.7-max, switching to qwen3.8-max cuts 20% off both input and output immediately. Meanwhile, qwen3.7-plus currently carries a limited-time 20% discount on the rolling alias, bringing effective base tier rates to $0.32 input and $1.28 output per 1M tokens. At the high-volume end, qwen3.8-flash ($0.15/$0.47) undercuts competing budget tiers such as DeepSeek V4.1 Flash ($0.30/$1.20 at peak rates, and lower than its off-peak output rate even without caching), while qwen3.7-flash ($0.05/$0.20) supports an additional 50% discount on batch inference.

Open-Weight Qwen Models: Official API vs. Apache 2.0 Self-Hosting

Alongside the closed Max, Plus, and Flash tiers, Alibaba serves its open-weight models directly on the Model Studio API. Every model in this series is released under the Apache 2.0 license, meaning you can either call Alibaba's hosted endpoint at the per-token rates below or download the weights for free (as of 2026-10-29) to run on your own hardware.

Model ID Architecture & Parameters Official API Input ($ / 1M, as of 2026-10-29) Official API Output ($ / 1M, as of 2026-10-29) Self-Hosting & License Notes
qwen3.8-2.4t-a95b 2.4T total, 95B active MoE $2.00 $6.00 Apache 2.0; multi-node GPU deployment
qwen3.8-27b 27B Dense $0.50 $3.00 Apache 2.0; runs on consumer GPUs or local Mac
qwen3.5-397b-a17b 397B total, 17B active MoE $0.60 $3.60 Apache 2.0; free weights available
qwen3.5-122b-a10b 122B total, 10B active MoE $0.40 $3.20 Apache 2.0; free weights available
qwen3.5-27b 27B Dense $0.30 $2.40 Apache 2.0; free weights available

Look closely at the hosted rate for qwen3.8-27b: at $0.50 input and $3.00 output (as of 2026-10-29), calling the 27B dense model on the official API is more expensive than calling qwen3.8-flash ($0.15/$0.47) or base-tier qwen3.7-plus ($0.40/$1.60). That is because a 27B dense model activates all 27 billion parameters on every token, whereas Mixture-of-Experts (MoE) checkpoints like qwen3.5-122b-a10b activate only 10B parameters per token.

The real advantage of qwen3.8-27b and qwen3.5-27b is self-hosting via vLLM, SGLang, or Ollama, where your per-token API bill drops to zero and you only pay for your local machine or rented GPU instance. If you want to wire the 27B checkpoint into your local terminal workflow, follow my guide on how to use Qwen 27B in Claude Code.

Qwen Image Generation Pricing (Per-Image Rates)

Image generation and editing models in Model Studio's visual catalog do not use token billing. Instead, they charge per image according to a fixed formula:

Total Cost = (Input image unit price × Number of input images) + (Output image unit price × Number of images generated)

Failed requests are never billed and do not consume your trial quota.

Image Model ID Resolution / Mode Input Image Price (as of 2026-10-29) Generated Image Price (as of 2026-10-29) New Account Free Quota (Singapore)
qwen-image-2.1-turbo Standard — $0.016 / image 10 images
qwen-image-2.1-pro Standard — $0.040 / image 10 images
qwen-image-3.0 1K or 2K resolution $0.003 / image $0.030 / image —
qwen-image-3.0-pro 1K resolution $0.003 / image $0.040 / image —
qwen-image-3.0-pro 2K resolution $0.003 / image $0.075 / image —
z-image-turbo prompt_extend=false — $0.015 / image —
z-image-turbo prompt_extend=true — $0.030 / image —
wan2.1-t2i-turbo Standard (Wanx) — $0.025 / image —

On z-image-turbo, leaving prompt expansion turned on (prompt_extend=true) doubles your per-image cost from $0.015 to $0.030 (as of 2026-10-29). If you already format detailed image prompts in your own application layer, pass prompt_extend=false to cut that rate in half.

How Tiered Pricing Works: The 256,001-Token Billing Cliff

On tiered models such as qwen3.7-plus, Alibaba Cloud's tiered pricing rules set the rate based on the total number of input tokens in a single API request. Crucially, this is not a marginal tax bracket: every token in the request is billed at the unit price of the tier you land in.

Here is what happens right at the boundary on qwen3.7-plus using standard list rates:

Single-Request Input Size Matched Tier Applied Input Rate ($ / 1M, as of 2026-10-29) Total Input Cost for the Request
256,000 tokens Tier 1 (0 < Token ≤ 256K) $0.40 $0.1024
256,001 tokens Tier 2 (256K < Token ≤ 1M) $1.20 $0.3072

Crossing the 256,000-token line by a single token reprices all 256,000 preceding tokens from $0.40/1M to $1.20/1M, and simultaneously triples the output rate for that call from $1.60/1M to $4.80/1M (as of 2026-10-29). A 1-token increase triggers a 200% jump in input cost ($0.1024 to $0.3072).

If your application sends long repository dumps or multi-document contexts that regularly hover above 256K input tokens, you have two ways to avoid this cliff. Either enforce a hard token truncation budget at 250,000 input tokens before sending the payload to qwen3.7-plus, or route requests above 256K straight to qwen3.8-max, where the flat $2.00 input and $6.00 output rate (as of 2026-10-29) holds steady up to 1M tokens without a tier multiplier.

Context Cache, Batch API, and Monthly Workload Math

Model Studio provides two major discount mechanisms—Context Cache and OpenAI-compatible Batch inference—with strict rules on how they interact:

  1. Context Cache (10% Hit Rate): Model Studio supports both explicit and implicit caching. Creating an explicit cache block costs 125% of the standard input token rate, while cache hits (both explicit and implicit) are billed at 10% of the standard input token price—a 90% discount on cached input tokens. Output tokens always bill at full price.
  2. Batch Inference (50% Off): Asynchronous batch jobs cut 50% off both input and output rates compared to real-time calls.
  3. No Stacking Rule: Batch calls and Context Cache discounts cannot be applied simultaneously. You have to pick one per workload. For interactive agents or pipelines with huge shared system prefixes and short outputs, real-time calls with a 10% cache hit rate beat Batch. For overnight ETL jobs where every prompt is distinct or output-heavy, Batch's 50% cut on both input and output wins.

To see how this plays out on an actual invoice, consider a customer support and document-processing workload running 500,000 requests per month on qwen3.7-plus, averaging 3,000 input tokens and 500 output tokens per call. Every request is 3,000 input tokens, staying safely inside Tier 1 (≤ 256K). Over a month, that adds up to 1.5 billion (1,500M) input tokens and 250 million (250M) output tokens.

Billing Scenario (qwen3.7-plus, 1,500M Input / 250M Output, as of 2026-10-29) Input Calculation Output Calculation Estimated Monthly Total
Uncached (Standard List Rate) 1,500M × $0.40 = $600.00 250M × $1.60 = $400.00 $1,000.00 ($800.00 with 20% promo)
With Context Cache (70% Cache Hit Ratio) (450M uncached × $0.40 = $180.00) + (1,050M cached × $0.04 = $42.00) = $222.00 250M × $1.60 = $400.00 $622.00 ($497.60 with 20% promo)
Batch API (50% Off, No Cache Stacking) 1,500M × $0.20 = $300.00 250M × $0.80 = $200.00 $500.00

Structuring your prompts so a static 2,100-token prefix (70% of the 3,000-token input) hits the Context Cache drops the monthly input charge from $600.00 to $222.00, saving $378.00 a month before any promotional discounts (as of 2026-10-29). Note that not every model activates implicit caching automatically on every endpoint; verify in your request logs that cached_tokens is incrementing, or configure explicit cache markers so you do not pay full uncached rates by mistake.

Cost Traps: Thinking Mode, Agent Loops, and File URL Parsing

Even when your per-million token rate looks low on paper, three request patterns routinely inflate Model Studio bills.

Thinking Mode (enable_thinking: true) Multiplies Output Volume

When thinking mode is active, the model generates an internal chain of thought before writing the visible response. Every single thinking token is billed at the model's output token rate ($6.00/1M on qwen3.8-max, $1.60/1M on qwen3.7-plus as of 2026-10-29). A prompt that returns a 150-token JSON object might silently generate 3,500 reasoning tokens first, multiplying your output bill for that call by more than 20x. For classification, data extraction, or straightforward chat, explicitly pass enable_thinking: false in your request body or use qwen3.8-flash.

Unchunked File URLs Count as Full Input Tokens

When you pass a document URL to the API, transferring the file over the network does not cost tokens, but Model Studio parses the entire document and bills all extracted text as input tokens. Passing a large PDF URL directly into a conversation can inject 300,000 tokens into a single turn—pushing qwen3.7-plus over the 256K tier cliff at the same time. Always chunk and index documents in a knowledge base first, and pass only the retrieved slices in your prompt.

Agent Context Growth and Heartbeat Probes

Agentic coding tools re-send system instructions, tool schemas, and growing conversation histories on every tool call. Keep health checks, routing classifiers, and heartbeat probes on qwen3.7-flash ($0.05/$0.20) or qwen3.8-flash ($0.15/$0.47) as of 2026-10-29. If your requests hit rate limits (HTTP 429), invalid parameter combinations (HTTP 400), or quota exhaustion, check Alibaba's official Model Studio error codes before adding blind retries that bill twice.

Free Quota Rules and the April 15, 2026 Policy Change

If you are following an older tutorial that promises permanent free Qwen API calls, be aware that Alibaba discontinued the permanent developer free API tier on April 15, 2026. The consumer web chat at qwen.ai remains free for manual use, but API keys now use a time-limited onboarding trial.

Under the current new-user free quota policy, activating Model Studio grants 1 million (1M) free tokens per eligible model, adding up to more than 70 million (70M+) free tokens across the full model catalog. Two strict rules govern this trial:

First, the free tokens expire 90 days after you activate Model Studio (or 90 days after a new model's release or access approval). Second, the free quota is strictly locked to the Singapore (ap-southeast-1) region. If you point your SDK at the Beijing, Hong Kong, Frankfurt, Virginia, or Tokyo endpoints, you receive zero free tokens and pay per token from your very first call.

To use your Singapore free quota with the standard OpenAI SDK, point your client at https://dashscope-intl.aliyuncs.com/compatible-mode/v1 (see how to configure this in my OpenAI Python SDK base_url guide). If you prefer routing through an aggregator instead of managing an Alibaba Cloud billing account directly, read my breakdown of how much OpenRouter costs vs. direct API access.

October 10, 2026 Model Retirements: All 47 Legacy IDs to Update

On October 10, 2026, Alibaba Cloud retired 47 legacy API model IDs across its mainline retirement notice and snapshot retirement notice. In addition, all historical qwen2.5-* model IDs are now deprecated. Every retired ID from both notices is grouped below alongside its official replacement and current-generation alternative:

Retired Legacy Model IDs (All 47 IDs Retired Oct 10, 2026) Official Recommended Replacement Latest Generation Alternative
Max Series (5 IDs): qwen3.6-max-preview, qwen3-max-preview, qwen3-max, qwen3-max-2026-01-23, qwen3-max-2025-09-23 qwen3.7-max ($2.50 / $7.50) qwen3.8-max ($2.00 / $6.00)
Flash & Small VL Series (7 IDs): qwen3-vl-flash, qwen3-vl-flash-2026-01-22, qwen3-vl-flash-2025-10-15, qwen3-vl-8b-instruct, qwen3-vl-8b-thinking, qwen3-8b, qwen3-14b qwen3.6-flash qwen3.8-flash ($0.15 / $0.47)
Qwen3 Coder Series (6 IDs): qwen3-coder-plus, qwen3-coder-plus-2025-09-23, qwen3-coder-plus-2025-07-22, qwen3-coder-next, qwen3-coder-30b-a3b-instruct, qwen3-coder-480b-a35b-instruct qwen3.7-plus ($0.40 / $1.60) qwen3.7-plus
Qwen3 Text & Thinking Snapshots (9 IDs): qwen3-235b-a22b, qwen3-235b-a22b-instruct-2507, qwen3-235b-a22b-thinking-2507, qwen3-next-80b-a3b-instruct, qwen3-next-80b-a3b-thinking, qwen3-32b, qwen3-30b-a3b, qwen3-30b-a3b-instruct-2507, qwen3-30b-a3b-thinking-2507 qwen3.7-plus ($0.40 / $1.60) qwen3.7-plus
Qwen3-VL Multimodal Snapshots (6 IDs): qwen3-vl-235b-a22b-instruct, qwen3-vl-235b-a22b-thinking, qwen3-vl-32b-instruct, qwen3-vl-32b-thinking, qwen3-vl-30b-a3b-instruct, qwen3-vl-30b-a3b-thinking qwen3.7-plus ($0.40 / $1.60) qwen3.7-plus
Hosted DeepSeek & Distill IDs (9 IDs): deepseek-r1-distill-qwen-7b, deepseek-r1-distill-qwen-14b, deepseek-r1-distill-qwen-32b, deepseek-v3, deepseek-v3.1, deepseek-v3.2, deepseek-v3.2-exp, deepseek-r1, deepseek-r1-0528 qwen3.7-plus ($0.40 / $1.60) qwen3.7-plus
Hosted Third-Party Snapshots (5 IDs): MiniMax-M2.1, glm-4.7, glm-4.6, Moonshot-Kimi-K2-Instruct, kimi-k2-thinking qwen3.7-plus ($0.40 / $1.60) qwen3.7-plus

When migrating from qwen3-max or qwen3.6-max-preview, Alibaba's notice maps to qwen3.7-max, but I recommend pointing directly to qwen3.8-max instead—you get the newer flagship generation at $2.00/$6.00 rather than paying $2.50/$7.50 on the 3.7 line.

Sources and checks

  1. Alibaba Cloud Model Studio
  2. Model Studio's visual catalog
  3. Alibaba Cloud's tiered pricing rules
  4. Context Cache
  5. OpenAI-compatible Batch inference
  6. Model Studio error codes
  7. qwen.ai
  8. new-user free quota policy
  9. mainline retirement notice
  10. snapshot retirement notice