TellWorldAI World Archive
Ask中文

Home›Practice›Practice

Practice

Calling the Qwen4-Max API: thinking mode, context and pricing

Qwen4-Max is called with the model ID qwen4-max. It offers thinking mode, a 1,000,000-token context and four API protocols, and output prices include chain-of-thought, so longer thinking costs more.

Who this is for and what you will learn

This guide is for developers who want to call Qwen4-Max from their own code. It covers the model ID, the API protocols it accepts, how thinking mode and reasoning effort are set, the context and output limits, and how pricing and rate limits work. After reading it, you should be able to make a first call and estimate what a workload will cost.

What Qwen4-Max is

Alibaba Cloud describes Qwen4-Max as a new-generation flagship multimodal model from Tongyi Qianwen. It combines text generation, image and video understanding, and deep thinking.[1] Alibaba Cloud says it suits programming, office work, front-end design and complex agent tasks.[1] Pass qwen4-max as the value of the model parameter.[1]

Protocols and modalities

You can call the model through OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and DashScope.[1] It accepts text, images and video as input, and it returns text only.[1]

Streaming output, deep thinking, parallel tool calls, web search, function calling and prefix completion are all supported. Structured output works in both JSON Object and JSON Schema form.[1]

Thinking mode and reasoning effort

Deep thinking is on by default, since enable_thinking defaults to true.[1] If you set neither reasoning_effort nor thinking_budget, the defaults are a reasoning effort of high and a thinking budget of 131,072 tokens.[1]

The accepted values depend on the protocol. OpenAI Chat Completions and DashScope use reasoning_effort, which accepts low, high and xhigh. minimal maps to low, medium maps to high, and max maps to xhigh.[1] OpenAI Responses uses reasoning.effort with the same values.[1] Anthropic Messages uses output_config.effort, which accepts low, high and xhigh; medium maps to high and max maps to xhigh.[1]

Context and output limits

The context length is 1,000,000 tokens.[1] Outside thinking mode, the maximum input is 991,808 tokens and the maximum output is 131,072 tokens. In thinking mode, the maximum input is 983,616 tokens and the maximum output is 262,144 tokens. The maximum chain-of-thought length is 262,144 tokens.[1]

The default max_completion_tokens is 262,144 in thinking mode and 131,072 without it.[1] Sampling defaults also change with the mode. Thinking mode uses a temperature of 1.0, a top_p of 0.95 and a presence_penalty of 0.0. Non-thinking mode uses a temperature of 0.7, a top_p of 0.8 and a presence_penalty of 1.5.[1] The default top_k is 20, the repetition_penalty is 1.0, and logprobs is off.[1]

Chain-of-thought summaries and multi-turn chats

When chain-of-thought summary and encryption are enabled, the response carries two things: a summary meant for display, and ciphertext that lets the model restore its earlier reasoning in later turns.[1] In a multi-turn conversation, pass the historical ciphertext back exactly as it was returned.[1]

Prompt caching

Explicit caching helps when many requests share a long prefix, such as a system prompt, tool descriptions or reference documents, because it cuts the cost of repeated input.[1] It works with OpenAI Chat Completions, OpenAI Responses and Anthropic Messages. The TTL can be 5 minutes (5m) or 1 hour (1h).[1]

Pricing and free quota

For the International deployment, the list price is $1.5 per million input tokens and $4.5 per million output tokens, in both non-thinking and thinking modes. For the Global deployment, the list price is $1.413 per million input tokens and $4.24 per million output tokens.[1] The output price covers chain-of-thought plus the response, so long thinking increases the bill.[1]

The free quota is valid for 90 days from the date of Model Studio activation, model release or application approval, whichever is later.[1]

Through the Batch File interface, batch prices are $0.707 per million input tokens and $2.12 per million output tokens. Batch Chat is listed at a limited-time 50% discount, with original prices of $1.413 for input and $4.24 for output.[1] The capability table marks batch inference as supported only in the China (Beijing) deployment, and as not supported in the other deployments it lists.[1]

Rate limits

Monthly spending sets the tier. Level 1, the current level, covers spending up to $8,000 a month. Level 2 covers $8,000 to $140,000, and Level 3 covers more than $140,000.[1] The TPM limit for qwen4-max is 5,000,000 tokens per minute at Level 1, 10,000,000 at Level 2 and 20,000,000 at Level 3.[1]

For the Global deployment, the per-minute limits are 30,000 requests and 5,000,000 tokens, with tokens counting input and output together.[1] The service may also throttle by requests per second (RPM/60) and tokens per second (TPM/60).[1]

Limits to keep in mind

Model fine-tuning is not supported, and model deployment is not supported either.[1]

Next steps

For the full details of each protocol, along with explicit caching and chain-of-thought summaries, read the pages in the Model Studio documentation.[1]

Sources

  1. 1
    qwen4-max (latest model)Alibaba Cloud Model Studio docs

Cite this page: Calling the Qwen4-Max API: thinking mode, context and pricing. TellWorld, https://www.tellworld.net/practice/practice-qwen4-max-api. Updated 2026-11-18

Related news

View all