top of page

Qwen context window 2026: 1M tokens on Qwen4-Max, 10M on Qwen-Long

Aug 12, 2025
8 min read

Updated: 9 hours ago

Qwen context window 2026 cover with the Qwen logo, 1M tokens on Qwen4-Max and 10M on Qwen-Long, Data Studios original cover

Updated: December 5, 2026


The current Qwen models on Alibaba Cloud Model Studio, Qwen4-Max, the new open-weight Qwen4-35B-A3B, Qwen3.7-Plus and Qwen3.8-Flash, all have a 1,000,000-token context window, with a maximum input of about 991,800 tokens in non-thinking mode and about 983,600 tokens in thinking mode. Qwen-Long is the exception at the top end, with a 10,000,000-token context that Alibaba documents for its Chinese mainland (Beijing) region only, while the legacy qwen-max alias still stops at 128K tokens.


Output is capped far below input. Qwen4-Max returns up to 131,072 tokens without thinking and up to 262,144 tokens in thinking mode, Qwen4-35B-A3B is listed at 128K and 256K, and Qwen-Long stops at 32,768 output tokens. The figures below come from Alibaba Cloud's model pages, model list, cache documentation and pricing page as checked on December 5, 2026, the day after Alibaba last updated its price list and added Qwen4-35B-A3B to it.


........


Model

Context window

Max input (non-thinking / thinking)

Max output (non-thinking / thinking)

Thinking mode

qwen4-max

1,000,000

991,808 / 983,616

131,072 / 262,144

Yes, on by default

qwen4-35b-a3b

1M

991K / 983K

128K / 256K

Yes

qwen3.7-plus

1,000,000

991,808 / 983,616

131,072 / 131,072

Yes

qwen3.8-flash

1,000,000

991,808 / 983,616

131,072 / 131,072

Yes

qwen-plus, qwen-flash

1M

Not listed

Not listed

Yes

qwen3-coder-flash

1M

Not listed

Not listed

Not listed

qwen-max (legacy alias)

128K

Not listed

Not listed

Not listed

qwen-long

10,000,000

10,000,000

32,768

No


........


··········


QWEN4-MAX CONTEXT WINDOW AND THINKING BUDGET.


Qwen4-Max is listed with a 1,000,000-token context, text, image and video input, and text output, and Alibaba's model list marks it as the choice when quality comes first. Thinking is enabled by default (`enable_thinking` is true), the default `thinking_budget` is 131,072 tokens and the default `reasoning_effort` is high, with low, high and xhigh as the supported values. The default `max_completion_tokens` is 262,144 in thinking mode and 131,072 in non-thinking mode, and the maximum chain-of-thought length is also 262,144 tokens, so a long reasoning trace and the visible answer share the same allowance.


Alibaba lists a lower input ceiling for thinking mode, 983,616 tokens against 991,808 without thinking. A request that sits close to the non-thinking ceiling can therefore fail once thinking is switched on, even though nothing in the prompt changed.


Alibaba lists Qwen4-Max in six regions: China (Beijing), Singapore, Germany (Frankfurt), US (Virginia), Japan (Tokyo) and Hong Kong. The International, Global and Virginia deployments list batch inference and fine-tuning as not supported, and the model supports streaming, function calling, parallel tool calls, structured output, web search and both explicit and implicit caching, over the OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and DashScope protocols. The earlier qwen4-max-preview is retired and now routes to qwen4-max. Our report on the Qwen4-Max launch and its API prices covers the price cut against Qwen3.8-Max in detail, and our Qwen4-Max vs Qwen3.8-Max comparison sets the two models side by side.


··········


⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣

QWEN4-35B-A3B: THE OPEN-WEIGHT QWEN4 MODEL WITH A 1M CONTEXT.


Qwen4-35B-A3B, released in December 2026, is the second Qwen4 model in Model Studio's model list, after Qwen4-Max. Alibaba describes it as the open-source version of the flagship Qwen series and as a sparse mixture-of-experts model with 35 billion total parameters, of which about 3 billion are active per step. The Model Studio page does not name the license of the weights, so the API terms below are the only ones Alibaba documents there.


Its limits match the larger models in everything except output. The model page lists a 1,000,000-token context window, a maximum input of 991K tokens without thinking and 983K with thinking, and a maximum output of 128K tokens without thinking and 256K with thinking, with a 256K chain-of-thought ceiling. Alibaba adds that input and output cannot both reach their maximums in the same request. Input can be text, image or video, and output is text.


The context window is roughly four times larger than on the hosted Qwen3.5-35B-A3B, which the model list still shows at 256K tokens, and the price is lower. On the International price list Qwen4-35B-A3B costs $0.06 per million input tokens and $0.36 per million output tokens across the whole 1M window, against $0.25 and $2 for Qwen3.5-35B-A3B on prompts up to 256K. Unlike Qwen4-Max, it supports model fine-tuning, and batch inference is offered in the Beijing region only, at half price.


··········


QWEN3.7-PLUS, QWEN3.8-FLASH AND THE OLDER QWEN MODELS.


Qwen3.7-Plus, which Alibaba's model list labels "Start here" as the model that balances capability and cost, and Qwen3.8-Flash, labeled as the choice when cost comes first, share the same limits on their model pages: a 1,000,000-token window, 991,808 input tokens without thinking, 983,616 with thinking, 131,072 output tokens in both modes and a maximum chain-of-thought length of 262,144 tokens. The qwen3.7-plus alias is described as functionally equivalent to the snapshot qwen3.7-plus-2026-05-26.


Most of the older models in the list keep a 1M window as well: Qwen3.8-Max, Qwen3.7-Max, Qwen3.7-Flash, Qwen3.6-Plus, Qwen3.6-Flash, Qwen3.5-Plus, Qwen3.5-Flash, the qwen-plus and qwen-flash aliases and their snapshots, and qwen3-coder-flash. The hosted open-weight Qwen3.5 models (397B-A17B, 122B-A10B, 27B and 35B-A3B) are listed at 256K. Smaller windows remain on specialized models, with 16K for the Qwen-MT translation models, 32K for qwen-plus-character and its Japanese variant, and 8K for qwen-flash-character. For the history of these generations, see our overview of how the Qwen model family evolved.


··········


QWEN-LONG AND ITS 10 MILLION TOKEN LIMIT.


Qwen-Long accepts up to 10,000,000 input tokens and returns at most 32,768. Alibaba states that its documentation applies only to the Chinese mainland (Beijing) region and that requests need an API key from that region, so developers on the international Singapore endpoint cannot use it.


Large inputs reach Qwen-Long as uploaded files rather than pasted text. Supported formats are TXT, DOCX, PDF, XLSX, EPUB, MOBI, MD, CSV, JSON and common image types, with a 150 MB limit per document and 20 MB per image, and an account quota of 10,000 files or 100 GB, whichever is reached first. Each file is referenced with a `fileid://` identifier in a system message, one request can reference up to 100 files, and Alibaba recommends file IDs over plain text once a document exceeds 1 million tokens. Uploads, storage and parsing are free, but the file's tokens are billed as input on every call that references it, at $0.072 per million input tokens and $0.287 per million output tokens, with batch jobs at half price.


··········


QWEN API MEMORY: HOW CONVERSATION HISTORY USES THE CONTEXT.


Alibaba's documentation says plainly that the Qwen API is stateless. The model keeps nothing between calls, so a multi-turn chat works only if the application sends the conversation history, previous questions and answers included, with every request. Each turn therefore adds input tokens, and a long session eventually runs into the context limit.


The documentation describes three ways to keep a session inside the window: keep only the most recent rounds, replace older turns with a summary once the history reaches 70% of the maximum context length, or store past turns in a vector database and retrieve only the relevant ones. For thinking models, the reply arrives as `reasoning_content` and `content`, and Alibaba asks developers to keep only `content` in the history so that reasoning traces do not consume the window on later turns.


Alibaba's pages describe memory for the API only. We found no official statement of the context length or memory behavior of the consumer Qwen Chat app, so the limits listed here apply to Model Studio API calls. Our Qwen Chat explainer covers the app itself.


··········


[[ADPLUS_300x250_1]]

QWEN CONTEXT CACHE AND TIERED PRICES FOR LONG PROMPTS.


Model Studio offers two cache modes that cannot be combined. Explicit caching needs a cached prefix of at least 1,024 tokens, and its standard rule is a 5-minute lifetime reset on every hit, billed at 125% of the input price to create and 10% on a hit. Implicit caching is automatic, cannot be switched off, has no guaranteed hit rate, and typically bills cached input at 20% of the standard price. The Qwen4 models follow their own rules: they accept a 5-minute or a 1-hour cache lifetime, with up to four breakpoints per request, and Qwen4-Max lists $1.875 per million tokens for a 5-minute cache write, $3 for a 1-hour write and $0.075 for a cache read. Qwen4-35B-A3B lists $0.075 for a 5-minute write, $0.12 for a 1-hour write and $0.003 for a cache read.


Prices also depend on how much of the window a request uses. Several models price by input tokens per request, so a prompt above 256K tokens costs more per token than a shorter one. Qwen4-Max, Qwen4-35B-A3B, Qwen3.8-Max and Qwen3.8-Flash use one rate across the whole 1M window.


........


Model (International)

Input, prompt up to 256K

Input, prompt 256K to 1M

Output, prompt up to 256K

Output, prompt 256K to 1M

qwen4-max

$1.50

$1.50

$4.50

$4.50

qwen4-35b-a3b

$0.06

$0.06

$0.36

$0.36

qwen3.8-max

$2.00

$2.00

$6.00

$6.00

qwen3.7-plus

$0.40

$1.20

$1.60

$4.80

qwen3.8-flash

$0.15

$0.15

$0.47

$0.47

qwen-flash

$0.05

$0.25

$0.40

$2.00


........


Prices are in USD per million tokens, as listed on Alibaba Cloud's official pricing page and model pages on December 5, 2026. The Global deployments in Frankfurt, Tokyo and Hong Kong charge slightly less for the two Qwen4 models, $1.413 and $4.24 for Qwen4-Max and $0.057 and $0.339 for Qwen4-35B-A3B. Qwen3.7-Plus carries a limited-time 20% discount label. The price list shows a free quota of 1 million tokens for Qwen4-Max, Qwen4-35B-A3B, Qwen3.8-Max, Qwen3.7-Plus, Qwen3.8-Flash and qwen-flash, valid for 90 days from activation, model release or application approval, whichever is later, while qwen-plus and the Qwen3.5 open-weight models have none.


··········


WHAT A 600,000-TOKEN QWEN PROMPT COSTS.


Take one request that sends a 600,000-token document and receives a 2,000-token answer. On Qwen4-Max it costs about $0.91, almost all of it input. The same request costs about $0.73 on Qwen3.7-Plus, because the prompt falls in the 256K-to-1M tier, $0.15 on qwen-flash, $0.09 on Qwen3.8-Flash and under 4 cents on Qwen4-35B-A3B. On Qwen3.7-Plus, a 200,000-token prompt with the same answer costs about $0.08, which shows how much the tier boundary adds.


........


Scenario (600K input, 2K output)

Cost per request

qwen4-max, no cache

$0.909

qwen4-max, cache read

$0.054

qwen3.7-plus (256K to 1M tier)

$0.730

qwen-flash (256K to 1M tier)

$0.154

qwen3.8-flash

$0.091

qwen4-35b-a3b, no cache

$0.037

qwen4-35b-a3b, cache read

$0.003


........


Caching changes the arithmetic for repeated questions about the same document. Twenty questions on Qwen4-Max cost about $18.18 if the document is resent at full price each time, and about $2.16 with an explicit 5-minute cache, counting one cache write and nineteen cache reads, provided each question arrives within 5 minutes of the previous one. On Qwen4-35B-A3B the same twenty questions cost about $0.73 without a cache and about $0.09 with one.


··········


⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁤

HOW TO CHECK QWEN TOKEN LIMITS BEFORE A LONG REQUEST.


Start from the model page in the Model Studio documentation, which lists the context length, the two input ceilings, the output cap and the thinking defaults for each model. Then confirm the region, since Qwen-Long exists only in Beijing, batch inference is not offered on the international deployments of Qwen4-Max, and the pricing page sets prices and free quotas separately for each deployment scope.


For a long job, leave headroom below 983,616 input tokens when thinking is on, set `max_completion_tokens` or the thinking budget to what the task needs, and put the fixed part of the prompt first so that it can be cached. On Qwen4-35B-A3B, remember that a request cannot use the full input and the full output at once. For anything above 1 million tokens, Qwen-Long with file IDs is the only documented option, and its 32,768-token output cap means very long answers have to be split across several calls.


··········


QWEN CONTEXT WINDOW LIMITS IN DECEMBER 2026.


The 1M-token window is now the standard across Qwen4-Max, Qwen4-35B-A3B, Qwen3.7-Plus, Qwen3.8-Flash and most older Qwen3.x models, with input ceilings of about 991,800 and 983,600 tokens, and Qwen-Long remains the 10M-token option for Beijing users only. Output caps of 131,072 tokens on the main models and 32,768 on Qwen-Long, a stateless API that resends history on every turn, and tiered prices above 256K tokens on Qwen3.7-Plus and qwen-flash set the practical limits. Qwen4-35B-A3B brings the same window to a 3B-active open-weight model at $0.06 per million input tokens, about a quarter of the input price of the 256K Qwen3.5-35B-A3B it follows, while Alibaba still publishes no context figure for the Qwen Chat app.


··········


FOLLOW US FOR MORE.


·····


DATA STUDIOS


·····


datastudios.org


bottom of page