# Qwen 4 API Pricing: Qwen4-Max Rates, Cache Math, and When It Pays Off
> Compare Qwen4-Max API pricing across 7 platforms ($1.20–$1.50/1M input), flat 1M context billing, prompt cache math, and three real developer workloads.
- Canonical HTML: https://beatapi.io/blog/qwen-4-api-pricing
- Markdown: https://beatapi.io/blog/qwen-4-api-pricing.md
- Entity: BeatAPI (https://beatapi.io) — AI Agent Gateway (unified API and MCP tool router for AI agents)
- Published: 2026-12-02
- Author: BeatAPI Team (https://beatapi.io/about)
- Language: en
- Category: Comparison
- Topic cluster: Unified Model APIs, Comparisons & Cost Control (Pillar Hub: https://beatapi.io/model)
- Reading time: 8 min read
- All blog posts for agents: https://beatapi.io/blog/llms.txt
---
[Qwen4-Max](/qwen4-api) is Alibaba's flagship multimodal model in the Qwen 4 family. It launched for general pay-as-you-go API access on November 16, 2026 as the successor to Qwen3.8-Max. The model uses a closed-weight 2.4-trillion-parameter mixture-of-experts architecture with 71B active parameters, reads text, images, and video inside a 1-million-token context window (991,808 usable tokens), and writes up to 131K output tokens with thinking off or 262K combined thinking and answer tokens with thinking on.
On November 25, 2026, Alibaba retired `qwen4-max-preview` and ended its preview weight discount. Calls to the old preview ID still work, but Alibaba routes them to `qwen4-max` at full standard rates, with no off-peak or nighttime discounts. Because Qwen4-Plus, Qwen4-Flash, and Qwen4-27B have not launched on public pay-as-you-go APIs yet, Qwen 4 API pricing today is about `qwen4-max`. You only need to check two things: which provider gives you the lowest steady rate, and which tasks actually pay back flagship pricing once you count cache hits and thinking tokens.
Quick answer
- **Flat pricing across the full 0–1M context window:** Qwen4-Max charges the same per-token rate from the first token to 1 million tokens, with no price jump past 128K or 200K input tokens.
- **BeatAPI has the lowest regular real-time rate ($1.20 input / $3.60 output per 1M tokens):** On BeatAPI, `qwen4-max` runs 20% below Alibaba Cloud's Singapore and US Virginia list price ($1.50 / $4.50) and roughly 15% below Alibaba's Global route, DeepInfra, and Novita ($1.41–$1.413 / $4.24). Cached input reads drop to **$0.06 per 1M tokens**.
- **Two cheaper options come with strict limits:** Together AI is running a limited-time 30% launch promo ($1.05 / $3.15, streaming required, thinking on by default, regular list $1.50 / $4.50). Alibaba Cloud China (Beijing) offers Batch File async pricing at 50% off ($0.707 / $2.12), limited to offline jobs in the Beijing region.
- **Cache reuse decides whether Qwen4-Max pays off:** Multi-file coding agents and long-document pipelines benefit most from Qwen4-Max's 95% cache read discount and flat 1M window. Single-turn chat and quick edits rarely hit cache, so cheaper models make more sense.
Every platform below serves the same `qwen4-max` model, priced per 1 million tokens in USD. Headline input and output prices only tell half the story. To estimate your real monthly bill, check cache write fees, regional limits, and top-up surcharges too.
| Platform | Input / 1M | Output / 1M (incl. thinking) | Cache read / 1M | 5-min cache write / 1M | Regional, promo, and fee notes |
| --- | --- | --- | --- | --- | --- |
| **[BeatAPI](/qwen4-api)** | **$1.20** | **$3.60** | **$0.06** | **$1.50** | Regular pay-as-you-go USD balance; no regional endpoint lock-in; one key covers other models, web search, and SEO data |
| **Alibaba Cloud Model Studio (Beijing, HK, Frankfurt, Tokyo, Global)** | $1.413 | $4.24 | $0.071 | ~$1.766 | Batch File async 50% off ($0.707 / $2.12) available only in China (Beijing) |
| **Alibaba Cloud Model Studio (Singapore, US Virginia)** | $1.50 | $4.50 | $0.075 | $1.875 (1-hr write $3.00) | 1M-token 90-day new-account free quota in Singapore; no Batch support |
| **OpenRouter (Alibaba Int. route)** | $1.425 (5% promo) | $4.275 (5% promo) | $0.07125 | $1.781 | US regional routing is $1.50 / $4.50; credit-card top-ups add a 5.5% fee |
| **DeepInfra / Novita AI** | $1.41–$1.413 | $4.24 | $0.071 | Varies by provider | Matches Alibaba Global list rates; no official Batch tier |
| **Fireworks AI** | $1.50 | $4.50 | $0.075 | Standard cache tier | Matches Alibaba Singapore and US Virginia list rates |
| **Together AI** | $1.50 (promo $1.05) | $4.50 (promo $3.15) | $0.075 (promo $0.0525) | Automatic prompt caching | Limited-time 30% launch sale; streaming required and thinking on by default |
Two billing details skew headline comparisons. OpenRouter's 5% promotional rate ($1.425 / $4.275) excludes its 5.5% credit-card top-up fee, which brings effective cost right back to roughly $1.50 / $4.50. Alibaba also sells monthly Model Studio Token Plans: they were cheap during the $3 preview window when preview calls consumed 20% credit weight, but at full 100% weight and $6–$8 renewal tiers, a heavy agent day can burn a third of a monthly allowance. Production workloads are easier to budget on pay-as-you-go API billing.
Three real developer workloads: when Qwen4-Max pays off
Per-million-token tables hide how much caching and thinking tokens move the final invoice. Three real engineering workloads show where Qwen4-Max earns its keep and where it wastes budget.
### 1. Multi-file full-stack or game-dev coding agents (OpenCode, Claude Code, custom harnesses)
Coding sessions that edit frontend components, backend routes, and tests together run 15 to 30 turns against the same repository context. Qwen4-Max holds up well here because it keeps cross-file constraints intact with fewer retry turns (Alibaba's Work360 evaluations report 24% to 35% fewer tokens than Qwen3.8-Max on multi-step agent tasks). Keeping your repo rules and file tree at the front of the prompt pushes cache hit rates past 80%, which drops repeated input to **$0.06 per 1M tokens** on BeatAPI.
For a monthly coding workload of 50M input tokens (40M cached reads, 10M uncached input, 5M cache writes) plus 5M output tokens, BeatAPI bills **$39.90**, Alibaba Global or DeepInfra bills **$47.00**, and Alibaba Singapore or Fireworks bills **$49.88**. On single-turn questions or quick one-file edits where prompt caching never gets reused, Qwen4-Max loses that edge. Routing light turns to [DeepSeek V4.1 Flash](/deepseek-v4-1-flash-api) or [Qwen3.8-Max](/qwen3-8-max-api) ($0.80/1M input on BeatAPI) saves far more.
### 2. Long financial filings, whole-repo docs, and video-frame analysis (200K–800K context)
Many flagship models double the price of an entire request once input crosses 128K or 200K tokens. Qwen4-Max keeps a single flat rate all the way to 1 million tokens and accepts images and video natively. You can pass full PDFs, UI screenshots, or long video clips straight into one call without maintaining a separate OCR or chunking pipeline.
For 20M uncached input tokens plus 2M output tokens per month, real-time calls cost **$31.20** on BeatAPI, **$36.74** on Alibaba Global, and **$39.00** on Alibaba Singapore or Fireworks. If your jobs run overnight, tolerate async turnaround, and can execute in Alibaba's China (Beijing) region, Alibaba's Batch File API ($0.707 / $2.12) drops that exact workload to **$18.38**, cheaper than any real-time provider.
### 3. Heavy debugging and architecture planning with deep thinking enabled
Qwen4-Max's deep thinking mode helps on gnarly multi-service bugs, but several providers turn thinking on by default and bill every chain-of-thought token at the full output rate (3× the input rate: **$3.60/1M** on BeatAPI, **$4.50/1M** on Alibaba Singapore). Leaving thinking enabled for routine extraction, tagging, or JSON formatting can double or triple your output bill without showing up in the visible answer.
For 10M input tokens plus 15M output tokens (thinking plus final answer), BeatAPI costs **$66.00**, Alibaba Global or DeepInfra costs **$77.73**, and Alibaba Singapore or Fireworks costs **$82.50**. Splitting the pipeline fixes the bill: turn thinking off (or route to a smaller model) for deterministic formatting and extraction, and save thinking-enabled Qwen4-Max calls for planning and root-cause debugging.
| Workload and monthly volume | BeatAPI (regular) | Alibaba Global / DeepInfra | Alibaba Singapore / Fireworks |
| --- | --- | --- | --- |
| **1. Multi-file coding agent (80% cache hit)**
40M cached read + 10M new input + 5M cache write + 5M output | **$39.90** | $47.00 | $49.88 |
| **2. Long-doc / video analysis (no cache)**
20M input + 2M output | **$31.20** (real-time) | $36.74 (real-time)
Beijing Batch: **$18.38** | $39.00 (real-time) |
| **3. Heavy thinking / reasoning**
10M input + 15M output (thinking + answer) | **$66.00** | $77.73 | $82.50 |
Three billing traps that inflate Qwen4-Max spend
- **Paying for 1-hour explicit cache on short sessions:** A 5-minute explicit cache write costs 1.25× input ($1.875 official, $1.50 on BeatAPI) and pays for itself after two or three follow-up turns at the 95% read discount. A 1-hour explicit cache write costs 2× input ($3.00/1M on Alibaba Singapore); if most of your agent loops wrap up within five minutes, 1-hour TTL wastes money.
- **Leaving `qwen4-max-preview` in older scripts:** Preview calls still succeed because Alibaba forwards them to `qwen4-max`, but they now bill at 100% standard rates. Update your config to `qwen4-max` and check live rates in [BeatAPI pricing](/pricing) so your cost estimates stay accurate.
- **Sending routine traffic to a closed flagship model:** Qwen4-Max is priced like a closed frontier model, so keep simple classification and boilerplate tasks on cheaper models. If you are deciding where Qwen4-Max fits alongside Claude in a multi-model stack, read our [Qwen 4.0 vs Claude Opus 5.5](/blog/qwen-4-0-vs-claude-opus-5-5) comparison.
To measure real spend on your own codebase before committing, point your existing OpenAI or Anthropic SDK base URL to BeatAPI, set the model to `qwen4-max`, and run 20 turns of a real multi-file task on a few dollars of prepaid balance. Your own cache hit rate and output token counts will tell you far more than any benchmark table.
FAQ
### Are Qwen4-Flash, Qwen4-Plus, or Qwen4-27B available via pay-as-you-go API yet?
No. Alibaba has only launched `qwen4-max` for general pay-as-you-go API billing so far. If you need a lower-priced Qwen model today, use [Qwen3.8-Flash](/qwen3-8-flash-api) or [Qwen3.8-Max](/qwen3-8-max-api).
### Does Qwen4-Max charge more once a request exceeds 128K or 256K tokens?
No. According to Alibaba Cloud Model Studio's pricing table, `qwen4-max` uses one flat per-million-token rate across the entire 0 to 1 million token context window.
### How does Together AI's 30% promo compare to BeatAPI's regular pricing?
Together AI's $1.05 / $3.15 rate is a temporary launch promotion (regular list price is $1.50 / $4.50) and requires streaming with thinking enabled by default. BeatAPI's $1.20 / $3.60 rate is its regular pay-as-you-go price, 20% below Alibaba's Singapore and US Virginia list rate, and uses one shared balance across Claude, GPT, Gemini, web search, and SEO tools.
### Can I use Alibaba Cloud's 50%-off Batch API from Singapore or US Virginia?
No. Alibaba Cloud Model Studio currently restricts `qwen4-max` Batch inference to the China (Beijing) region; Singapore, US Virginia, Frankfurt, Tokyo, and Hong Kong endpoints do not support Batch.