Official docs · as of 2026-11-18

Qwen4-Max API Pricing & Guide: 2.4T MoE & Flat 1M Context (2026-11)

As of 2026-11-18, Alibaba Cloud Model Studio (Bailian) officially launched the pay-as-you-go flagship model qwen4-max on 2026-11-16 (while the preview ID qwen4-max-preview sunsets on 2026-11-25 at 24:00). Built on a sparse MoE architecture with 2.4T total parameters, 71B active parameters per token, and 328B N-gram Embedding parameters, it offers a 1,000,000 (1M) context window and up to 262,144 thinking output tokens with flat single-tier pricing across 0 < Token ≤ 1M (no long-context surcharge: Beijing ¥10 input / ¥30 output / ¥0.5 cache hit; Singapore $1.50 input / $4.50 output / $0.075 implicit cache per 1M tokens). QCode supports qwen4-max via its OpenAI-compatible endpoint and in Claude Code.

Updated 2026-11-18

Claude, GPT and Chinese models on one key, billed per token; check /models for callable models.

#2.4T / 71B + 328B#Flat 1M pricing#¥10/¥30 · $1.50/$4.50#Work360 52.69 ($1.67)

Four Official Alibaba Cloud Specs and Rates

2.4T / 71B

Sparse MoE architecture + 328B N-gram Embedding

Per Alibaba Cloud and Qwen's official technical releases (2026-11-15 / 2026-11-16), qwen4-max combines a 2.4T-parameter sparse MoE backbone (71B active per token) with 328B N-gram Embedding parameters; its 1,000,000-token context window supports 991,808 max input / 131,072 max output in non-thinking mode and 983,616 max input / 262,144 max output in thinking mode across text, image, and video inputs.

¥10 / ¥30

Alibaba Cloud China Mainland (Beijing) official rates (per 1M tokens)

Per Alibaba Cloud Model Studio's official rate card, qwen4-max uses flat single-tier pricing across 0 < Token ≤ 1M with no long-context surcharge: in China Mainland (Beijing node, RMB per 1M tokens), input is ¥10 (10 RMB), output (including chain-of-thought) is ¥30 (30 RMB), 5-minute cache write is ¥12.5 (12.5 RMB), 1-hour cache write is ¥20 (20 RMB), explicit/implicit cache hit is ¥0.5 (0.5 RMB), and Batch File is ¥5 input / ¥15 output.

$1.50 / $4.50

Alibaba Cloud International (Singapore) official rates (per 1M tokens)

Per Alibaba Cloud International's official rate card (Singapore node, USD per 1M tokens, flat across 0 < Token ≤ 1M): input is $1.50, output is $4.50, 5-minute cache write is $1.875, 1-hour cache write is $3.00, and explicit/implicit cache hit is $0.075 (implicit cache cut by 70% vs qwen3.8-max; the international Beijing node USD rate is $1.413 input / $4.24 output).

52.69 / $1.67

Work360 score gain & 62% lower cost per task

On official benchmarks, qwen4-max scores 52.69 on Work360 (up from 47.74 on qwen3.8-max) while cutting average cost per task by 62% from $4.43 to $1.67 (high effort uses ~35% fewer tokens, and Terminal-Bench 4.0 uses ~48%–49% fewer tokens); it ranks #6 on Code Arena and lifts Last Secure Code Bench pass rate from 22.0% to 31.8%.

Full Qwen4-Max Official Rate Table and Flat 1M Context Window

As of 2026-11-18, the biggest billing change in qwen4-max for long-context developers is that Alibaba Cloud Model Studio's official pricing removes tiered long-context surcharges, applying one flat rate across the entire 0 < Token ≤ 1,000,000 (1M) window. Whether you send a 10K-token prompt or a 900K-token repository dump, Alibaba Cloud's official rate at the Beijing node stays ¥10 input, ¥30 output, and ¥0.5 explicit/implicit cache hit (with ¥12.5 for 5-minute cache writes, ¥20 for 1-hour cache writes, and ¥5 / ¥15 for Batch File per 1M tokens); at the Singapore node it stays $1.50 input, $4.50 output, and $0.075 explicit/implicit cache hit ($1.875 for 5-minute cache writes, $3.00 for 1-hour cache writes, and $1.413 / $4.24 on the international Beijing node per 1M tokens). Compared with models that apply a 2x/1.5x surcharge above 272K input tokens, flat 1M pricing combined with a 70% reduction in implicit cache hits ($0.075 / ¥0.5) keeps large-repo agent costs predictable. See /qwen-4-release-date for release background and /ai-coding-tools-pricing-2026 for cross-vendor pricing.

Thinking Effort (low / high / xhigh), 4 Native Protocols & Preview Sunset

For API integration, the GA release of qwen4-max introduces three key engineering details: ① Thinking controls & parameter mapping — thinking mode is enabled by default (enable_thinking defaults to true), and reasoning_effort supports low, high (default), and xhigh while automatically mapping OpenAI's minimal→low, medium→high, max→xhigh and Anthropic's medium→high, max→xhigh; non-thinking mode supports up to 991,808 input and 131,072 output tokens, whereas thinking mode supports up to 983,616 input and 262,144 total output tokens (chain-of-thought + final answer). ② Four native protocols — Alibaba Cloud Model Studio natively supports OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, and DashScope. ③ Preview sunset notice — the preview ID qwen4-max-preview launched on 2026-11-11 (Token Plan only, no pay-as-you-go) will be retired on 2026-11-25 at 24:00 per Alibaba Cloud's official notice, so production workloads should use the GA model ID qwen4-max.

Qwen4-Max Release Timeline

2026-11-11

Alibaba Cloud Model Studio launches the preview model ID qwen4-max-preview (restricted to Token Plan without pay-as-you-go billing) and schedules its retirement for 2026-11-25 at 24:00.

2026-11-16

Alibaba Cloud officially launches pay-as-you-go GA model ID qwen4-max (dated 2026-11-15 on the Qwen blog and 2026-11-16 in Alibaba Cloud's press release and Bailian release log) with a 1,000,000 context window and flat 0 < Token ≤ 1M pricing.

2026-11-18

QCode supports GA qwen4-max in production via https://api.qcode.cc/openai/v1 and in Claude Code (https://api.qcode.cc/api) via /model qwen4-max; all figures on this page were verified on 2026-11-18.

Confirmed Details vs Unannounced Items

Confirmed (Alibaba Cloud Model Studio docs & Qwen technical report)

① Architecture & window: 2.4T total sparse MoE backbone parameters, 71B active per token, plus 328B N-gram Embedding parameters; 1,000,000-token context window, 991,808 max input / 131,072 max output (non-thinking) and 983,616 max input / 262,144 max output (thinking); text, image, and video input with text output. ② Alibaba Cloud official API pricing (flat across 0 < Token ≤ 1M): Beijing node ¥10 input, ¥30 output, ¥12.5 5-minute cache write, ¥20 1-hour cache write, ¥0.5 explicit/implicit cache hit, ¥5 / ¥15 Batch File; Singapore node $1.50 input, $4.50 output, $1.875 5-minute cache write, $3.00 1-hour cache write, $0.075 cache hit (implicit cache cut by 70% vs qwen3.8-max), and $1.413 / $4.24 on the international Beijing node. ③ Benchmarks: Work360 52.69 (vs 47.74 on qwen3.8-max), average cost per task down 62% from $4.43 to $1.67 (~35% fewer tokens at high effort, ~48%–49% fewer tokens on Terminal-Bench 4.0); #6 on Code Arena; Last Secure Code Bench up from 22.0% to 31.8%. ④ Hosting: qwen4-max is a hosted closed-weight flagship; the official table marks self-deployment and fine-tuning as unsupported.

Not yet published or released

As of 2026-11-18, although Alibaba Cloud announced plans to open-source smaller Qwen4 models in the future, it has not published specific release dates, parameter sizes, or open-source licenses; likewise, only the flagship qwen4-max (and the preview retiring on 2026-11-25 at 24:00) is listed in Model Studio, with no Qwen4 plus, flash, or coder variants released yet.

How Qwen4-Max Compares with Qwen3.8-Max and Contemporaneous Coding Models

Against qwen3.8-max: higher accuracy with far fewer tokens

Compared with qwen3.8-max, qwen4-max raises Work360 from 47.74 to 52.69 and improves function-level functional-and-secure pass rates on Last Secure Code Bench from 22.0% to 31.8%; because high effort consumes roughly 35% fewer tokens (and 48%–49% fewer tokens on Terminal-Bench 4.0) while implicit cache hits drop by 70% (to $0.075 / ¥0.5), average task cost on Work360 falls 62% from $4.43 to $1.67.

Against November 2026 coding models: flat 1M window & multi-model routing

Among domestic models in November 2026, alongside qwen4-max (2026-11-16), DeepSeek upgraded its online flash model to DeepSeek-V4.1-Flash-1017 on 2026-11-13 (scoring 77.0 on DeepSWE v1.1 and 42.3 on Terminal-Bench 4.0) and Moonshot launched kimi-k3.1-pro on 2026-11-05 (1M context, 131,072 max output). On QCode, one API key routes across qwen4-max, deepseek-v4.1-flash, kimi-k3.1-pro, glm-5.3, claude-fable-5-2, gpt-6.2-astra, and gpt-6.2-sol.

Copy-Paste Setup to Call qwen4-max on QCode

① In Claude Code: point ANTHROPIC_BASE_URL to https://api.qcode.cc/api and set ANTHROPIC_AUTH_TOKEN to your cr_ key; inside a session, run /model qwen4-max (or export ANTHROPIC_MODEL=qwen4-max at launch, or set "model": "qwen4-max" in ~/.claude/settings.json). ② In the OpenAI SDK / Cline / WorkBuddy / OpenCode: set base_url to https://api.qcode.cc/openai/v1 (or https://asia.qcode.cc/openai/v1 in mainland China, with no trailing slash), pass your cr_ key as api_key, set model to "qwen4-max", and pass "low", "high", or "xhigh" in reasoning_effort. ③ Worked cost example (at Alibaba Cloud's official API rates): for a 400,000-token input request (where 80% or 320,000 tokens hit implicit cache and 80,000 tokens are uncached input) plus 10,000 output tokens, the 400K prompt still pays the flat 0 < Token ≤ 1M rate — at official Beijing RMB rates: 80,000 ÷ 1,000,000 × ¥10 + 320,000 ÷ 1,000,000 × ¥0.5 + 10,000 ÷ 1,000,000 × ¥30 = ¥0.80 + ¥0.16 + ¥0.30 = ¥1.26; at official Singapore USD rates: $0.12 + $0.024 + $0.045 = $0.189.

Call qwen4-max Alongside Global Flagships on One QCode Key

QCode supports qwen4-max on the same cr_ API key that calls claude-fable-5-2, claude-opus-5-5, gpt-6.2-astra, gpt-6.2-sol, qwen3.8-max, deepseek-v4.1-flash, kimi-k3.1-pro, and glm-5.3. QCode bills per token, with live per-model rates on /models. Not ready for a monthly plan? Pay-as-you-go Packs start at $4 for a one-time quota you use within 7 days; if you already have a Personal Plan, add a booster pack when you need more quota.

Frequently Asked Questions

What is the official API price of qwen4-max, and does it double above 256K tokens?

No, there is no long-context surcharge. Per Alibaba Cloud Model Studio's official pricing, qwen4-max charges a single flat rate across the entire 0 < Token ≤ 1,000,000 (1M) context window: China Mainland (Beijing) is ¥10 input, ¥30 output (including thinking tokens), and ¥0.5 explicit/implicit cache hit per 1M tokens; International (Singapore) is $1.50 input, $4.50 output, and $0.075 explicit/implicit cache hit per 1M tokens. QCode bills per token, with live per-model rates on /models.

What is the difference between qwen4-max and qwen4-max-preview?

qwen4-max-preview was the preview ID launched on 2026-11-11 (restricted to Token Plan without pay-as-you-go billing) and is scheduled to sunset on 2026-11-25 at 24:00; qwen4-max is the official pay-as-you-go GA model ID launched on 2026-11-16 with 262,144 max thinking output tokens and low / high / xhigh reasoning_effort support. Always use the GA ID qwen4-max in production.

What are qwen4-max's parameter counts and maximum output limits?

Per the official technical report and Model Studio docs, qwen4-max uses a sparse MoE architecture with 2.4T total backbone parameters, 71B active parameters per token, and 328B N-gram Embedding parameters; its 1,000,000-token context window supports up to 991,808 input / 131,072 output tokens in non-thinking mode, and up to 983,616 input / 262,144 total output tokens (chain-of-thought + response) in thinking mode.

How do I switch to qwen4-max inside Claude Code?

When Claude Code is configured with ANTHROPIC_BASE_URL=https://api.qcode.cc/api and your QCode cr_ key in ANTHROPIC_AUTH_TOKEN, simply run /model qwen4-max inside the session to switch to qwen4-max without changing your CLI tool.

How do I configure thinking depth (reasoning_effort) on qwen4-max?

Thinking mode is on by default (enable_thinking = true), and GA reasoning_effort accepts low, high (default), and xhigh; if your SDK sends OpenAI's minimal, medium, or max or Anthropic's medium or max, the protocol layer automatically maps them to low, high, and xhigh.

Is qwen4-max open-weight, and are there plus or coder variants yet?

As of 2026-11-18, qwen4-max is a hosted closed-weight flagship model (marked unsupported for self-deployment and fine-tuning in the official table); Alibaba Cloud has stated that smaller Qwen4 models will be open-sourced later, and no Qwen4 plus, flash, or coder variants have been released yet.

Sources

Alibaba Cloud Model Studio official docs: Qwen4-Max model documentation, Model Studio pricing pages (China Mainland and International), and the 2026-11-16 release log; Qwen official technical blog (2026-11-15) and Alibaba Cloud press release (2026-11-16); DeepSeek 2026-11-13 release notes; QCode: qcode.cc/models and docs.qcode.cc endpoint guides (all verified on 2026-11-18).

Call Qwen4-Max (1M Context) on QCode Today

Create a QCode account, billed per token with live per-model rates on /models; connect via the OpenAI SDK or type /model qwen4-max in Claude Code.

Not sure where to start?

Try it for a week

Small Pack: $4 for $30 of quota, valid 7 days

Use it every day

Starter: $9.00/month with $5 of quota every day — just $0.060 per $1 of quota, vs about $0.113 for the Medium Pack