Qwen4-Max Is Now Available: 1M Context, API Pricing, Responses API Setup and Preview Migration (November 2026)
Updated: November 23, 2026. Alibaba’s Qwen team introduced Qwen4-Max on November 16 as the hosted flagship of its Qwen4 generation. The important developer update this week is not just the model announcement: Alibaba’s Model Studio documentation now lists the production model across its regional endpoints, documents OpenAI Responses and Anthropic-compatible access, and provides a clear migration path away from the time-limited Qwen4-Max-Preview.
If you are testing the preview, take note: Alibaba says qwen4-max-preview will be retired after November 25, 2026 (24:00 UTC+8). The production model ID is qwen4-max. This guide explains what is confirmed, how to call it from Python, what it costs, and what to change before the preview disappears.
Qwen4-Max at a glance
- Release announcement: November 16, 2026.
- Production API model ID:
qwen4-max. - Architecture claim: 2.4-trillion-parameter sparse mixture-of-experts model with 71 billion parameters activated per token, according to Qwen and Alibaba Cloud.
- Input: text, images and video; output: text.
- Context: 1,000,000 tokens.
- API protocols: OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and native DashScope.
- Availability: hosted inference through Alibaba Cloud Model Studio and Token Plan. Qwen4-Max is not a downloadable open-weight checkpoint.
- Current documentation check: the Model Studio model page and Responses API guide were updated November 23, 2026.
Primary references: Qwen’s November 16 announcement and the Model Studio Qwen4-Max model page.
What actually changed this week?
Qwen4-Max was announced on November 16, not November 23. The November 23 update matters because Alibaba’s current documentation now gives developers a production model ID, regional endpoint details, protocol compatibility, context limits, default reasoning settings and current prices in one model reference. Alibaba Cloud Community also published a Qwen4-Max cost-and-workload overview on November 23.
The production model is distinct from the short-lived preview. The preview is available through Token Plan only, has its own model ID and is scheduled to retire after November 25. Alibaba explicitly recommends the production Qwen4-Max model instead. Do not assume that a working preview configuration will remain valid after that date.
Architecture and capabilities: what is confirmed?
Qwen describes Qwen4-Max as a 2.4T-parameter sparse MoE model with 71B active parameters per token. Treat those figures as vendor-published architecture specifications; they do not tell you how fast the model will run for your workload, and the model is served by Alibaba rather than downloaded to your GPUs.
The Model Studio capability table lists text, image and video input with text output. It also lists deep thinking, streaming, function calling, parallel tool calls, web search, structured JSON output and compatibility with OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and DashScope. Fine-tuning and dedicated model deployment are listed as unsupported for Qwen4-Max. Batch inference availability differs by region: the current page lists it for Beijing, but not for Singapore and several global regions.
This is therefore best understood as a hosted multimodal reasoning and agent model, not a local model release. It can inspect visual input, but it does not generate image or video output. Use a separate Qwen image or video model for generation.
One-million-token context: read the actual limits
The headline context window is 1,000,000 tokens. The current Model Studio table gives a maximum input of 991,808 tokens in non-thinking mode and 983,616 in thinking mode. Maximum output is 131,072 tokens in non-thinking mode and 262,144 in thinking mode. The thinking-mode output allowance is shared between reasoning and the final answer; it is not 262,144 answer tokens on top of a separate reasoning budget.
Thinking is enabled by default. The documented default reasoning effort is high, with a default thinking budget of 131,072. OpenAI Responses uses reasoning.effort and supports low, high and xhigh. Chat Completions and DashScope use reasoning_effort. Start with a smaller output cap during integration tests so a long reasoning run does not consume more tokens than your application expects.
Pricing: check the region before estimating your bill
Model Studio pricing is region-dependent. The current model page lists the Singapore international endpoint at $1.50 per million input tokens and $4.50 per million output tokens. Several global deployments, including the global scope shown for Germany, Japan and Hong Kong, list $1.413 input and $4.24 output per million tokens. The China (Beijing) price is also listed separately. Check the live pricing table for your workspace rather than copying a price from another region.
Alibaba Cloud’s November 23 community article lists an implicit-cache hit price of $0.075 per million input tokens. That is a vendor-published price, not a guaranteed discount on every request: a cache hit depends on identical reusable prefixes and the applicable cache rules. The same article reports a 62% reduction in average cost per task in Alibaba’s Work360 evaluation. That is Alibaba’s own evaluation result, not an independent benchmark or a promise that every customer will save 62%.
For long-running agents, repeated system prompts, tool definitions and reference material may make caching useful. Measure actual cached-token usage in your own responses and compare the total task cost, including output tokens and tool calls.
Quick start: call Qwen4-Max with the OpenAI Responses API
The following example uses the Singapore Model Studio endpoint. Create a Model Studio workspace, obtain a standard Model Studio API key, and replace the workspace placeholder with the Workspace ID shown in the console. Use the endpoint for your actual region if your workspace is elsewhere.
- Create or select a Model Studio workspace in the Singapore region.
- Create a standard Model Studio API key in the console. Keep it out of source control and client-side code.
- Install the OpenAI Python SDK:
pip install -U openai. - Set the API key as an environment variable.
- Use the production model ID
qwen4-maxand the Responses endpoint.
export DASHSCOPE_API_KEY="YOUR_MODEL_STUDIO_API_KEY"
export DASHSCOPE_BASE_URL="https://YOUR_WORKSPACE_ID.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1"
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DASHSCOPE_API_KEY"],
base_url=os.environ["DASHSCOPE_BASE_URL"],
)
response = client.responses.create(
model="qwen4-max",
input="Explain the trade-offs between a queue and a workflow engine.",
reasoning={"effort": "high"},
max_output_tokens=2048,
)
print(response.output_text)
The model ID and Singapore Responses endpoint match Alibaba’s current documentation. The sample is a starting point, not a claim that it has been executed against your account. Confirm the workspace region, API key type, account permissions and billing configuration before production use.
Using multi-turn Responses without resending the full history
Model Studio documents previous_response_id for continuing a Responses API conversation. The previous response ID is valid for seven days according to the current API guide. Store it as conversation state, handle expiry, and do not confuse the top-level response ID with a message ID inside the output array.
first = client.responses.create(
model="qwen4-max",
input="My project uses FastAPI and PostgreSQL. Remember that context."
)
second = client.responses.create(
model="qwen4-max",
input="Suggest a safe deployment checklist for this project.",
previous_response_id=first.id,
)
print(second.output_text)
For applications that need durable history beyond the documented response-ID lifetime, keep your own conversation records and build a recovery path. A provider-side conversation reference should not be your only copy of important application state.
Migrate from Qwen4-Max-Preview before November 25
Alibaba’s preview page states that qwen4-max-preview is Token Plan-only and will be retired after 24:00 on November 25, 2026 (UTC+8). The production model qwen4-max is already available and is the recommended target.
| Setting | Preview | Production |
|---|---|---|
| Model ID | qwen4-max-preview | qwen4-max |
| Availability | Temporary Token Plan preview | Model Studio production API and supported Token Plan access |
| Preview end | November 25, 2026, 24:00 UTC+8 | No preview retirement date listed |
| Context | 1M tokens | 1M tokens |
| Output budget | Preview documentation lists up to 393,216 shared tokens | Current model page lists up to 262,144 in thinking mode |
Do not assume the output budget is unchanged. The preview documentation and production model page publish different maximum output figures. Re-test truncation, tool-call loops, reasoning settings and response parsing with production limits.
- Find every occurrence of
qwen4-max-previewin environment files, Qwen Code settings, agent configuration and deployment manifests. - Change the model ID to
qwen4-max. - Confirm whether the integration uses a Token Plan key or a standard Model Studio API key. These use different base URLs and billing arrangements.
- For the OpenAI-compatible Responses API, use the current regional path ending in
/compatible-mode/v1. The documented Singapore endpoint is workspace-specific. - Review output limits. The production model’s thinking and answer share the documented output budget.
- Run regression tests for text, image and video inputs, structured output, function calling, retries and conversation continuation.
- Deploy to a small canary first, monitor latency, token usage, errors and cost, then roll out gradually.
Alibaba’s Responses API documentation also warns that the legacy path /api/v2/apps/protocols/compatible-mode/v1/responses is no longer maintained. Use the current /compatible-mode/v1/responses path with the correct regional host.
Connect Qwen Code to Model Studio
If you use the Qwen Code CLI rather than building your own backend, Alibaba’s November 23 Qwen Code guide documents a guided setup:
- Run
qwenand select Alibaba ModelStudio as the provider on first use. - Select the Singapore region in the documented flow.
- Choose the billing option you actually use: Token Plan, Coding Plan or standard Model Studio API key.
- Enter the corresponding key. Do not mix a Token Plan key with a standard pay-as-you-go endpoint.
- Verify the connection with
qwen -p "Hello".
For a persistent configuration, the official guide documents ~/.qwen/settings.json on macOS/Linux and C:\Users\<username>\.qwen\settings.json on Windows. Use the configuration template for your plan, preserve the matching environment-variable name and envKey, and keep credentials in environment variables rather than committing them to a repository.
Important billing distinction: Alibaba’s Token Plan Team documentation restricts that plan to interactive use in compatible coding and agent tools and says it is not permitted for automated scripts or application backends. If you are building a production API, background worker or customer-facing application, check the applicable plan terms and use the standard Model Studio API where required.
Responses API, built-in tools and caching
Alibaba’s OpenAI-compatible Responses API adds a provider-managed interface for agent workflows, including built-in tools such as web search, web scraping and code interpreter where supported. It also supports string or message-array input and previous_response_id for simpler multi-turn context management. Tool availability is model- and region-dependent, so verify the exact combination before designing a workflow around it.
Qwen4 explicit caching supports a 5-minute or 1-hour time-to-live. You can let the service place an automatic breakpoint or mark a stable prefix yourself. A cache hit requires the same prefix and is scoped to the same user. Keep stable system instructions, tool definitions and reference text before the changing user question. The first request creates the cache; subsequent matching requests within the TTL may read it.
For production agents, record cache-read and cache-write token counts, response IDs, tool usage and total request cost. Caching can reduce repeated input processing, but it does not make new output tokens, changing context or tool execution free.
Who should evaluate Qwen4-Max?
- Agent developers: teams building multi-step workflows that need tool calling, structured output and long context.
- Document and video analysis teams: applications that need a hosted model to read large text collections alongside images or video input.
- Product engineering teams: developers who want to test a different hosted model behind OpenAI-compatible or Anthropic-compatible clients.
- Cost-conscious API teams: teams with repeated long prompts that can measure whether caching and task-level pricing improve their own unit economics.
It is less suitable if you require downloadable weights, offline inference, dedicated self-hosting, model fine-tuning, or guaranteed batch inference in a region where the current capability table marks it unsupported. It may also be unnecessarily expensive for simple high-volume classification or latency-sensitive tasks where a smaller model is adequate.
Limitations and facts to verify before shipping
- Hosted model, not open weights: Qwen4-Max is delivered through Model Studio. The current capability page lists model deployment and fine-tuning as unsupported. Alibaba says smaller Qwen4 models are planned for open release, but that is not the same as releasing Qwen4-Max weights.
- Regional differences: API hosts, pricing, rate limits and features vary. Use the documentation for the workspace region.
- Context is not a budget guarantee: one million tokens is a maximum context specification. Large prompts and long outputs still affect latency, rate limits and billing.
- Thinking uses output budget: leave room for reasoning as well as the final answer. Set limits based on measured task needs.
- Vendor evaluation claims: Alibaba’s reported Work360 cost-per-task improvement and benchmark comparisons are company-published results. Treat them as hypotheses to reproduce on your own workload, not universal performance guarantees.
- Preview deadline: the preview is scheduled to retire after November 25, 2026. Check the live notice in case Alibaba changes the date or terms.
- No independent hardware test: this is a hosted API guide. The examples were checked against the official documentation but were not executed against a live Alibaba account.
Frequently asked questions
Is Qwen4-Max open source or downloadable?
No. The current Qwen4-Max offering is hosted through Alibaba Cloud Model Studio and Token Plan. The model page lists deployment and fine-tuning as unsupported. Alibaba has said smaller Qwen4 models are coming to open source, but that does not make the Max model downloadable.
What is the correct API model ID?
Use qwen4-max for the production model. qwen4-max-preview is the temporary preview ID and is scheduled to retire after November 25, 2026 (UTC+8).
Does Qwen4-Max generate images or videos?
No. It accepts text, image and video input and returns text. Use a separate image or video generation model when you need generated media.
Can I keep using my existing OpenAI SDK?
Yes, for the documented OpenAI-compatible endpoints, you can use the OpenAI SDK with the Model Studio regional base URL and API key. However, compatibility does not mean every OpenAI parameter, tool or behavior is identical. Test the exact features your application uses.
Can I use the Token Plan key in my backend?
Do not assume so. The Token Plan Team terms restrict it to interactive use in compatible coding and agent tools and prohibit automated scripts or application backends. Review the plan terms and use the appropriate standard API credentials for backend workloads.
What should I test when migrating from the preview?
Test the model ID, API host, key type, output token cap, thinking settings, multimodal payloads, tool calls, structured output, multi-turn state, retries and billing. The production model documents a smaller maximum thinking output budget than the preview page, so do not carry the old limit over blindly.
Official sources and further reading
- Qwen: Qwen4-Max announcement, November 16, 2026
- Alibaba Cloud Model Studio: Qwen4-Max model capabilities, context, prices and regions
- Alibaba Cloud Model Studio: OpenAI-compatible Responses API
- Qwen4-Max-Preview: retirement notice and preview limits
- Token Plan product updates: Qwen4-Max availability
- Qwen Code: Model Studio setup guide
- Explicit cache for Qwen4: breakpoints and TTL
- Alibaba Cloud Community: Qwen4-Max pricing and Work360 claims, November 23, 2026
Related GyanAangan guides
- GPT-6.2 Astra and Sol: API changes, pricing and migration
- Gemini 4 Hydrogen: API setup, thinking levels and agent workflows
- Temporal vs Celery for durable AI workflows
Bottom line: Qwen4-Max is a hosted, multimodal flagship worth testing for complex agent and long-context work. The practical action for existing preview users is straightforward: move to qwen4-max, verify the correct region and credential type, and retest output limits before the preview retirement date.
