Qwen 4 Max Preview
New1,000,000 tokens of context
Alibaba's newest flagship model with a 1M token context and deep reasoning. Best quality in the Qwen lineup: complex code, math, analysis, and multimodal tasks. Trained on 2026 data.
Provider
Premium
Provider model
qwen4-max
Pricing
per 1M tokens
Input
Wellflow price: $0.15
Output
Wellflow price: $0.45
Prompt caching
The repeated part of a request (system prompt, documents, chat history) is stored in the cache. Reading it back costs less than regular input.
80–95%of tokens when you work in an IDE
An agent in Cursor or Claude Code sends the whole context again on every step: project files, rules, history. Only a few percent of each request is new, the rest repeats. That is why in an IDE your bill depends on the cache price first of all.
- Cache read
- Wellflow price: $0.02
- -87% vs input price
- Cache write
- Wellflow price: $0.10
- -33% vs input price
Performance
Availability and speed of the model through Wellflow.
Uptime
Speed
Connect Wellflow to your IDE
What Qwen 4 Max Preview is good for
- Planning & analysisMulti-step tasks, weighing options, structured decisions
- Complex refactorsReworking large code areas while keeping behavior
- ImagesScreenshots, documents, diagrams and UI mocks on input
- Long contextWhole codebases, long documents and threads
How to call Qwen 4 Max Preview
OpenAI SDK · Cursor · Codex
https://api.wellflow.dev/v1
Anthropic SDK · Claude Code
https://api.wellflow.dev
curl
curl https://api.wellflow.dev/v1/chat/completions \
-H "Authorization: Bearer $WELLFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen4-max",
"messages": [{"role": "user", "content": "Hello"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.wellflow.dev/v1", api_key="...")
resp = client.chat.completions.create(
model="qwen4-max",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)Qwen 4 Max Preview: frequently asked questions
Qwen 4 Max Preview costs $0.15 per 1M input tokens and $0.45 per 1M output tokens. Cached context reads: $0.02 per 1M. You pay only for tokens actually used, with no monthly fee.
The context window of Qwen 4 Max Preview is up to 1,000,000 tokens: enough for a whole codebase or hundreds of pages of text.
Create a key in the Wellflow dashboard and POST to https://api.wellflow.dev/v1/chat/completions with model = "qwen4-max". The API is OpenAI SDK compatible, so any client works, streaming included.
Yes. Qwen 4 Max Preview works from Claude Code (connected via ANTHROPIC_BASE_URL), Cursor, Codex CLI and VS Code: one base URL for all of them. Step-by-step guides live in the docs.
In Qwen 4 Max Preview, repeated context (system prompts, agent history) is cached: reads cost $0.02 per 1M tokens instead of $0.15. In IDE agents most of every request is repeated context, so the saving is immediate.