Skip to main content
Getting Started

Latest model: Qwen4-Max

Explore Qwen4-Max for coding, professional work, long-running agents, and scientific exploration, with model specifications, API access, explicit caching, and CoT Summary.

Qwen4-Max is the first model in the Qwen4 family, combining reasoning, native vision, and long-running task execution. It supports coding, professional work, design, and scientific exploration, using tools and feedback to turn complex goals into reviewable deliverables. Model ID: qwen4-max

Key highlights

Coding and engineering — Combines visual understanding, code generation, and professional tools. The launch blog demonstrates building an Unreal Engine game, turning production-line layouts into 3D models, and improving machining plans through simulation feedback. Professional work — Brings together evidence retrieval, analysis, and deliverable creation. Examples include financial research with linked Excel workbooks and editable presentations, and legal due diligence with document classification, cross-source checks, and traceable citations. Long-running agents and live delivery — Plans and iterates over extended tasks. With the Qwen Live Delivery plugin, an agent can deliver a usable first version and update it as work progresses, allowing users to review results and redirect the task. Scientific exploration — Connects research, specialized tools, and experimental feedback. The blog describes a cooling-fluid molecule designed and synthesized through an integrated experimental platform, and drug candidates optimized through computational evaluation for further laboratory validation. See the launch blog for the examples and full evaluation results.

Capabilities and specifications

Streaming, parallel tool calls, prefix completion, and implicit caching are also supported.
ParameterValueParameterValue
Context length1,000,000 tokensMaximum output (non-thinking)131,072 tokens
Maximum input (non-thinking)991,808 tokensMaximum input (thinking)983,616 tokens
Maximum thinking + final answer262,144 tokensDefault thinking budget131,072 tokens
Available in Singapore (International), China North 2 (Beijing, China), and Frankfurt, Hong Kong, Tokyo, and US (Virginia) (Global). Beijing and Global share the same prices; Singapore has separate prices. Fine-tuning and model deployment are not supported. See Pricing and Rate limits. Pay-as-you-go calls in Singapore offer 1 million free tokens, separate from Token Plan credits; see Free quota for eligibility and validity.

Quick start

Obtain an API Key, set the DASHSCOPE_API_KEY environment variable, and install the OpenAI SDK for your language. The examples below use the pay-as-you-go Chat Completions API. For Token Plan credentials and endpoints, see Token Plan.
import os
from openai import OpenAI

client = OpenAI(
  api_key=os.getenv("DASHSCOPE_API_KEY"),
  # Singapore (ap-southeast-1). For another region, replace ap-southeast-1 in the URL.
  # API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regions
  base_url="https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1"
)

response = client.chat.completions.create(
  model="qwen4-max",
  messages=[
    {"role": "user", "content": "Create a project plan with staged deliveries. For each stage, list goals, acceptance criteria, and deliverables."}
  ]
)
print(response.choices[0].message.content)
Other supported APIs: Responses, Anthropic Messages, and DashScope. Qwen4-Max uses the DashScope multimodal endpoint even for text-only input.

Usage notes

Thinking and tool calls

Thinking is enabled by default, with reasoning_effort=high and thinking_budget=131072. Use low, high, or xhigh to select the reasoning effort. In Chat Completions, set enable_thinking=false to turn thinking off. max_completion_tokens limits thinking and the final answer together: up to 262,144 tokens in thinking mode or 131,072 in non-thinking mode. preserve_thinking is enabled by default. Preserve the assistant messages and their reasoning in multi-turn tool calls. See Thinking and Function calling. The Responses API also supports MCP tool calling.

Parameter

Default

temperature

1.0 in thinking mode; 0.7 in non-thinking mode.

top_p

0.95 in thinking mode; 0.8 in non-thinking mode.

top_k

20

repetition_penalty

1.0

presence_penalty

0.0 (Thinking); 1.5 (Non-thinking)

logprobs

false

enable_thinking

true

preserve_thinking

true

reasoning_effort

high

thinking_budget

131072

max_completion_tokens

262144 (Thinking); 131072 (Non-thinking)

When reasoning_effort and thinking_budget are omitted, the defaults are reasoning_effort=high and thinking_budget=131072.
ProtocolParameterSupported valuesDefaultMapping
OpenAI Chat Completions / DashScopereasoning_effortlow, high, xhighhighminimal → low; medium → high; max → xhigh
OpenAI Responsesreasoning.effortlow, high, xhighhighminimal → low; medium → high; max → xhigh
Anthropic Messagesoutput_config.effortlow, high, xhighhighmedium → high; max → xhigh

Explicit cache (Qwen4)

Reuse shared input prefixes such as system prompts, tool definitions, and reference documents to reduce repeated computation, latency, and input costs. Set cache breakpoints manually or let automatic caching place them. A matching prefix can be reused deterministically while its cache remains valid. TTL options are 5m and 1h, with 5m as the default; implicit cache does not guarantee hits. Supported APIs are Chat Completions, Responses, and Anthropic Messages. DashScope does not support the new Qwen4 explicit cache. Cache writes and reads use the model's published rates. See Explicit cache (Qwen4) for configuration, renewal, and billing.

CoT Summary

Return a readable summary of the model's reasoning together with the encrypted full reasoning, instead of returning the full reasoning in plain text. The summary is for display; the encrypted content restores reasoning history in later turns. Enable the feature on every turn and return historical encrypted content unchanged. A summary cannot replace the encrypted reasoning history. This feature supports Chat Completions, Responses, Anthropic Messages, and DashScope. Summaries or encrypted content can be absent. See CoT Summary for API-specific settings, streaming fields, and multi-turn examples.

Use in coding tools

Use Qwen4-Max through Token Plan Personal, Token Plan Team, or the pay-as-you-go API. Token Plan usage consumes Credits; use the corresponding API Key and endpoint. The separate qwen4-max-preview model has its own preview benefits.