RSS
News

Qwen4-Max is out: 1M context, $1.50/$4.50 pricing, and a Claude Code setup

Alibaba released Qwen4-Max on November 16 at $1.50 in and $4.50 out per million tokens, 25% below Qwen3.8-Max (0902), with cache reads 70% cheaper. It has a 1M-token context and works in Claude Code through QwenCloud's Anthropic-compatible endpoint.

a rack of electronic equipment in a dark room
Photo by Tyler on Unsplash

Alibaba's Qwen team released Qwen4-Max on November 16, 2026, the first model on its new Qwen4 architecture. It is available through the QwenCloud API (with a Token Plan or pay-as-you-go billing), in Alibaba's QwenWork, Qoder and QwenStudio apps, and on OpenRouter as qwen/qwen4-max.

The developer headline is price. As of November 16, QwenCloud lists $1.50 per million input tokens, $4.50 per million output tokens and $0.075 per million cached input tokens. Compared with Qwen3.8-Max (0902) on OpenRouter ($2, $6 and $0.25), input and output are 25% lower and cache reads 70% lower. The pricier Qwen3.8-Max Prime variant ($4, $12, $0.50) would show a bigger gap.

Quick facts

  • Model ID: qwen4-max (QwenCloud), qwen/qwen4-max (OpenRouter).
  • Architecture: sparse mixture-of-experts with 2.4T backbone parameters, 71B active per token, plus 328B N-gram Embedding parameters.
  • Context: 1M tokens. QwenCloud lists max input 991K (983K in thinking mode), max output 393K and max reasoning 262K; Artificial Analysis lists a 984K window.
  • Input: QwenCloud lists text, image and video understanding; Artificial Analysis lists text and image only. Output: text.
  • Features listed by QwenCloud: OpenAI- and Anthropic-compatible APIs, function calling, structured outputs, web search, prefix completion, batches, context cache, fine-tuning. Rate limit: 5,000,000 tokens per minute.
  • Cache writes: explicit cache creation costs $1.875 per million tokens for 5 minutes or $3 for 1 hour.
  • Weights: the launch post does not offer weights for Max; it says smaller Qwen4 models are coming to open source.

What the price change means for an agent session

Alibaba also says Qwen4-Max uses fewer tokens than Qwen3.8-Max. On its in-house Work360 benchmark (26 top-level domains, 182 subdomains, 721 specialised fields) usage drops about 24% at Xhigh effort and 35% at High; on Terminal-Bench 4.0 the drops are about 48% and 49%. On Work360 it reports average cost per task falling from $4.43 to $1.67, a 62% drop. These are Alibaba's numbers.

To isolate the list-price effect, take one coding-agent turn with 200,000 input tokens, 180,000 of them cache reads, plus 10,000 output tokens. At Qwen4-Max prices it costs about $0.089 (20K fresh input $0.030, 180K cached $0.0135, 10K output $0.045). At Qwen3.8-Max (0902) prices on OpenRouter it costs about $0.145, so roughly 39% less. This assumes the cache already exists: writing the cache in the first place costs $1.875 or $3 per million tokens, so first turns cost more.

What independent testing says

Artificial Analysis scores Qwen4-Max at 43 on its Intelligence Index v5.0.1 (nine evaluations including Terminal-Bench 4.0), above the median of 41 for comparable models. It measured $3.27 per index task and called the model very verbose: it generated 127 million tokens across the index, against a median of 78.6 million. High token use can offset part of the low per-token price; Artificial Analysis does not quantify by how much.

Alibaba's own figures: Work360 rose from 47.74 for Qwen3.8-Max to 52.69. On Last Secure Code Bench, under its code-reconstruction-without-security-hint and dual-verification conditions, the function-level rate of code passing both functionality and security checks rose from 22.0% to 31.8%, and the share secure at function, file and repository level at once rose from 8% to 14.7%. Some charts in the launch post cite outside leaderboards, but Work360 and the secure-coding numbers are Alibaba's own tests; check on your own repository before switching.

How to use Qwen4-Max in Claude Code

QwenCloud's Claude Code guide says to set ANTHROPIC_DEFAULT_OPUS_MODEL to qwen4-max and keep CLAUDE_CODE_MAX_CONTEXT_TOKENS at 983616. If long output is cut off, set CLAUDE_CODE_MAX_OUTPUT_TOKENS=131072. Per the guide, qwen4-max outputs up to 131,072 tokens in non-thinking mode and 262,144 for thinking plus the final answer, with defaults of reasoning_effort=high and thinking_budget=131072.

Each key type has its own base URL: a Token Plan key uses the token-plan endpoint, a pay-as-you-go key (it starts with sk-) uses a regional endpoint, and pay-as-you-go keys are region-specific. The guide also says to set hasCompletedOnboarding to true in ~/.claude.json; without it Claude Code tries to reach Anthropic's login service on startup.

# Pay-as-you-go key, Singapore region (from QwenCloud's Claude Code guide)
# For another region, replace ap-southeast-1 per QwenCloud's region list.
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_BASE_URL="https://ap-southeast-1.maas.qwencloudapi.com/apps/anthropic"
export ANTHROPIC_DEFAULT_OPUS_MODEL="qwen4-max"
export CLAUDE_CODE_MAX_CONTEXT_TOKENS="983616"

# A Token Plan key uses this base URL instead:
# export ANTHROPIC_BASE_URL="https://token-plan.maas.qwencloudapi.com/apps/anthropic"

claude -p "Hello"

The guide's copy-paste examples set the other slots (ANTHROPIC_MODEL, the Haiku and Sonnet defaults, CLAUDE_CODE_SUBAGENT_MODEL) to older models such as qwen3.6-flash, qwen3.8-flash and qwen3.7-max, and still show qwen4-max-preview in the Opus slot. The guide gives no qwen4-max values for those other slots, so decide them yourself and change each one you want routed to Qwen4-Max.

Troubleshooting

  • 401 invalid_api_key: the key type does not match ANTHROPIC_BASE_URL. Pair a Token Plan key with the token-plan URL and a pay-as-you-go key with the regional URL.
  • "Unable to connect to Anthropic services": run /status inside Claude Code and check that ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN point to QwenCloud, and that hasCompletedOnboarding is true.
  • 403 AccessDenied after mapping a model: check whether the model is marked Upcoming deprecation in the QwenCloud console.
  • Still failing: the guide suggests updating Claude Code with npm install -g @anthropic-ai/claude-code@latest.
  • Do not paste the real key into scripts, settings files you share, or shell history; read it from an environment variable.

Try it with your AI. Give this to your coding agent to set up a one-session trial of Qwen4-Max in Claude Code without touching your current setup:

I want to try Qwen4-Max in Claude Code without changing my global setup.
Before running this, I will set my QwenCloud key in an environment variable named
QWEN_API_KEY myself.
1. Show me my current ~/.claude/settings.json env block and whether ~/.claude.json has
   hasCompletedOnboarding set. Change nothing yet.
2. Ask me whether my key is a Token Plan key or a pay-as-you-go key, and which region it
   was created in (for example ap-southeast-1).
3. Write a script, try-qwen4.sh, that exports for this one shell only:
   ANTHROPIC_AUTH_TOKEN="$QWEN_API_KEY" (never write the key itself into the file),
   ANTHROPIC_BASE_URL for my key type and region from QwenCloud's Claude Code guide (it
   must end in /apps/anthropic, no /v1), ANTHROPIC_DEFAULT_OPUS_MODEL=qwen4-max,
   CLAUDE_CODE_MAX_CONTEXT_TOKENS=983616. Ask me which models I want for the Haiku,
   Sonnet and subagent slots. The script then runs: claude -p "Hello".
4. Show me the script and wait for my confirmation, then run it with bash try-qwen4.sh.
5. If hasCompletedOnboarding is missing, show me the one-line change to ~/.claude.json
   and wait for my approval.
6. On 401, check the key type matches the base URL. On "Unable to connect to Anthropic
   services", check the variables took effect. Report the exact error. Do not edit my
   global settings without asking, and do not delete any files.

Qwen Live Delivery plugin

Alongside the model, Alibaba open-sourced Qwen-Live-Delivery-Plugin under Apache-2.0. Version 0.1.0 works with Codex CLI on Linux and macOS, needs Node.js 22+, and was tested with Codex 0.166.0 and 0.167.1. It makes a long-running agent ship a usable first version early, then keep publishing versions you can preview and steer from a local browser workbench, with a time budget of up to 7 days. It uses your own Codex model and authentication; no model or key is included.

cd /path/to/Qwen-Live-Delivery-Plugin
./live-delivery/install.sh --workspace /path/to/project
./live-delivery/install.sh --doctor   # check the installation

Two safety notes from the README: the printed workbench link grants access, so keep it private, and for local or SSH-forwarded use set QWEN_LD_BIND_HOST=127.0.0.1. Browser tasks default to the workspace-write sandbox; setting QWEN_LD_TASK_SANDBOX=danger-full-access turns off the sandbox and per-command approval.

Known limits

  • No open weights for Max: you use it through Alibaba's cloud or a reseller such as OpenRouter.
  • Verbose output: Artificial Analysis measured token use well above the median, which may offset part of the lower price.
  • Work360 is a benchmark Alibaba built itself; separate Alibaba's own tests from third-party results.
  • Video input is listed by QwenCloud but not by Artificial Analysis; test your endpoint before building a video workflow.
  • Prices are as of November 16, 2026; check the QwenCloud and OpenRouter pages before budgeting.

FAQ

How much does Qwen4-Max cost? $1.50 per million input tokens, $4.50 per million output tokens and $0.075 per million cached input tokens on QwenCloud, with the same input, output and cache-read prices on OpenRouter.

How much does Qwen4-Max context caching cost? Implicit cache hits and explicit cache reads are $0.075 per million tokens. Explicit cache creation costs $1.875 per million tokens for 5 minutes or $3 for 1 hour.

What is Qwen4-Max's maximum output? QwenCloud lists 393K. The Claude Code guide says 131,072 tokens in non-thinking mode and 262,144 for thinking plus the final answer.

Is Qwen4-Max open source? The launch post does not release Max weights. It says smaller Qwen4 models are coming to open source.

Can I use Qwen4-Max with Claude Code? Yes. Set ANTHROPIC_DEFAULT_OPUS_MODEL to qwen4-max with the base URL that matches your key type, and set hasCompletedOnboarding to true in ~/.claude.json.

Where else can I use Qwen4-Max? In QwenWork, Qoder and QwenStudio, and through OpenRouter as qwen/qwen4-max.

Source: Qwen4-Max: Your New Teammate Has Arrived (Qwen blog), Qwen4-Max model page and pricing (QwenCloud), Claude Code setup (QwenCloud docs), Qwen4 Max: intelligence, performance and price analysis (Artificial Analysis), OpenRouter model list, QwenLM/Qwen-Live-Delivery-Plugin (GitHub)

This story first appeared in the claudefox daily briefing for November 16, 2026.