All articles
ArticlesNovember 16, 20266 min read

Qwen4-Max API pricing: 1M context, closed weights

Qwen4-Max API pricing is $1.50/$4.50 per million tokens with 1M context. What the cache discount, benchmarks and closed weights mean for agent builders.

qwen4-maxqwenalibaballm api pricingai agentscontext cachingopen weights
Qwen4-Max API pricing: 1M context, closed weights

Alibaba released Qwen4-Max on November 16, 2026. It is the new flagship of the Qwen family: a 2.4-trillion-parameter mixture-of-experts model that reads text, images and video, takes up to 1M tokens of context, and Qwen4-Max API pricing starts at $1.50 per million input tokens on QwenCloud.

I build agents for business software, so the parameter count interests me less than three other things: the price per finished task, the cache pricing, and the fact that this time the weights stay closed. Those decide whether Qwen4-Max ends up in a real agent stack or just on a leaderboard screenshot.

What Alibaba shipped with Qwen4-Max

From the launch announcement and the QwenCloud model page:

  • 2.4 trillion total parameters, 71 billion active per token. Alibaba says that is 25% fewer active parameters than Qwen3.8-Max at the same 2.4T scale.
  • Native vision. Input is text, image and video; output is text.
  • 1M-token context. Max input is 991K tokens, max output is 131K, and in thinking mode the output cap rises to 262K.
  • Tool calling, structured outputs, prefix completion, built-in web search, batches and fine-tuning.
  • A rate limit of 5,000,000 tokens per minute listed on the model page.

A limited preview opened on November 11 through Alibaba's Token Plan only, according to the QwenCloud changelog. The general API release came five days later. It is also inside Alibaba's own apps, including Qwen Studio, QwenWork and Qoder.

Qwen4-Max API pricing in detail

Here are the international list prices from QwenCloud's model pricing page, next to the previous two Max models:

ModelInput (per 1M)Output (per 1M)
qwen4-max$1.50$4.50
qwen3.8-max$2.00$6.00
qwen3.7-max$2.50$7.50

Cache pricing for qwen4-max:

Cache operationPrice (per 1M tokens)
Implicit cache hit$0.075
Explicit cache write, 5 minutes$1.875
Explicit cache write, 1 hour$3.00
Explicit cache read$0.075

Two details matter here. First, thinking and non-thinking modes cost the same, so you don't pay a premium for turning reasoning on, only for the extra output tokens it produces. Second, a cache hit is 20 times cheaper than fresh input. For agents, that second number is the one to plan around.

Here is a rough example with my own numbers, not Alibaba's. Say an agent step sends 200K tokens of context, 150K of it is a repeated prefix that hits the cache, and it writes 10K tokens back:

  • 50K fresh input: about $0.075
  • 150K cached input: about $0.011
  • 10K output: $0.045

That is roughly $0.13 for the step. Without the cache hit, the same call costs about $0.35. Keep system prompts, tool definitions and long documents at the front of the prompt and stable between calls, or you throw that discount away.

There is also a 1M-token free quota on the international deployment, which is enough to run your own eval suite before you commit.

Benchmarks: strong on coding, mixed on terminal work

Alibaba says Qwen4-Max ranked 6th on Code Arena and beats Qwen3.8-Max on Work360, its in-house benchmark of industry tasks across 721 fields. On Work360 it used 35% fewer tokens at high reasoning effort and cut the average cost per task by about 60%. The Next Web reports that figure as a drop from $4.43 to $1.67 per task.

The independent read is less tidy. Citing FourWeekMBA's look at Alibaba's charts, The Next Web notes:

  • DeepSWE v1.1: Qwen4-Max 75.7, Claude Opus 5.5 74.2.
  • Terminal-Bench 4.0: Qwen4-Max 48.5, Opus 5.5 59.6, Kimi K3.1 67.2.

So it is competitive on repository-level coding and clearly behind on long terminal sessions. If your agent mostly lives in a shell, running builds, reading logs and retrying, that gap is the number to test first. All of these scores come from vendors, and harnesses differ. I said the same about Mistral Large 4's benchmarks: treat them as a ranking hint and run your own tasks.

Closed weights this time

This is the real change. Earlier Qwen releases made the family the most downloaded open-weight models in the world, according to Bloomberg via The Next Web. Qwen4-Max can't be downloaded or modified. Alibaba says smaller Qwen4 models will get open weights, with no date.

For self-hosting, that changes the comparison. Mistral Large 4 is open weight at $0.70 input and $2.10 output on Mistral's API. Qwen4-Max is cheaper than the last Qwen Max but still about twice that per token, and you can only reach it through Alibaba's cloud. If data residency or an NDA with a client rules out a third-party API, Qwen4-Max is off the table until those smaller open Qwen4 models land.

Using the Qwen4-Max API from existing code

Because the endpoint is OpenAI-compatible, switching is mostly a base URL and model name change. This is trimmed from the official example on the model page:

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    base_url="https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1",
)

completion = client.chat.completions.create(
    model="qwen4-max",
    messages=[{"role": "user", "content": "Who are you"}],
    extra_body={"enable_thinking": True},
    stream=True,
)

The page also lists Anthropic API compatibility, with web_search and web_fetch as built-in tools there, and a Responses API with a code interpreter. That makes it easy to put Qwen4-Max behind the same gateway you already use and A/B it against your current model on real tickets.

Safety notes worth reading

Alibaba says it filtered training data by task intent: it kept defensive security material for finding and fixing flaws and removed offensive attack content. It also says code training included security checks for issues like injection, memory safety and broken access control.

That is good to hear, but I would still review agent output the way I review a junior engineer's PR. Cheaper generation only moves the bottleneck to review, which is the point I made in code has become cheap. The Next Web also points out that earlier Qwen models drew scrutiny: in October, Cohere said the open Qwen3.8-Flash-Next tried to upload a file to a server in Beijing during a sandboxed test. Whatever model you pick, run agents with network egress limits and scoped credentials.

What I would do this week

If you run agents on a frontier API today, Qwen4-Max is worth one afternoon. Use the free quota, replay 20 to 50 of your real tasks, and measure cost per completed task with caching turned on, not price per token. Watch the terminal-heavy tasks closely. And if open weights are what you actually need, wait for the smaller Qwen4 releases.

FAQ

How much does the Qwen4-Max API cost?

On QwenCloud's international deployment, $1.50 per million input tokens and $4.50 per million output tokens, in both thinking and non-thinking modes. Cached input is $0.075 per million tokens.

Is Qwen4-Max open source?

No. Qwen4-Max is closed weight and only available through QwenCloud and Alibaba apps. Alibaba says smaller Qwen4 models will be released with open weights, without a date.

What is the Qwen4-Max context window?

1M tokens. Max input is 991K tokens, and max output is 131K, or 262K in thinking mode.

Does Qwen4-Max work with OpenAI SDKs?

Yes. QwenCloud exposes an OpenAI-compatible endpoint, so you set the base URL and use qwen4-max as the model name. An Anthropic-compatible API is also listed.


Sources: Alibaba Cloud: Alibaba unveils Qwen4-Max, QwenCloud Qwen4-Max model page, QwenCloud model pricing, QwenCloud model changelog, The Next Web: Alibaba launches Qwen4-Max without open weights

Cover image: Qwen 4 launch graphic, Alibaba Cloud

Related articles