Skip to main content

Moderate
alibaba/qwen-4-max/chat

Qwen4-Max chat endpoint by Alibaba: 1,000,000-token input window, up to 384,000 output tokens, image_url vision input, four reasoning levels, tool calling, and structured JSON output.

Input $1.275Output $3.825per 1 million tokensCached input $0.0638Cache write $1.5938

Workbench

Qwen4-Max

What can Qwen4-Max help with?

Missing the model you need?

1M-CONTEXT MULTIMODAL REASONING API

Qwen4-Max API at a glance

Alibaba's flagship 1M-context model with vision, adjustable reasoning, and up to 384,000 output tokens.

Input context
1M
Qwen4-Max accepts up to 1,000,000 tokens per call.
Reply ceiling
384K
Qwen4-Max max_tokens reaches 384,000 (default 4,096).
Effort levels
4
Qwen4-Max effort options: none, low, medium, high (default medium).
Tools per call
128
Qwen4-Max accepts 128 tool schemas with parallel calls.
Input types
2
Qwen4-Max reads text and image_url in one turn.
Streaming
SSE
Qwen4-Max streams incremental replies over SSE.

Results

What Qwen4-Max is good at

  • Long context

    One million tokens of source material in a single turn

    Qwen4-Max accepts up to 1,000,000 input tokens across 256 messages, keeping full repositories, specifications, and multi-document dossiers intact without lossy chunking.

  • Reasoning

    Four reasoning levels from none to high

    Switch reasoning_effort between none, low, medium, and high per request. Keep routine extraction fast at none or low, and raise depth for architecture reviews and complex debugging.

  • Vision & tools

    Images, function calls, and structured JSON together

    Mix text and image_url parts in user messages while defining up to 128 tools or a response_format JSON schema for reliable downstream automation.

Before you run it

What to know before you run Qwen4-Max

Chat
Qwen4-Max allows 1,000,000 input tokens across 256 messages and max_tokens from 1 to 384,000 (default 4,096).
Chat
On Qwen4-Max, reasoning tokens count inside max_tokens, so tight limits at higher effort can end before visible text.
Chat
Live evaluation placed Qwen4-Max in the borderline tier: romantic fiction and intense horror pass reliably, whereas explicit adult erotica is mostly refused.

Use cases

What to build with the Qwen4-Max API

  • Repository-scale engineering reviews

    Pass key source modules, test logs, and design docs together and ask Qwen4-Max for file-referenced defects and an ordered refactor plan.

  • Visual inspection of diagrams and UI captures

    Attach architecture diagrams, charts, or interface screenshots via image_url and request structured findings alongside code fixes.

  • Long-form technical synthesis

    Generate detailed specifications, migration guides, or audit reports using up to 384,000 output tokens with streaming enabled.

Prompts

Qwen4-Max prompt examples you can copy

  • Chat

    Compare API pagination designs

    Compare two API pagination designs (cursor-based vs offset-based) for a high-write event log and recommend migration steps. Work from the material I provide. Separate verified facts from assumptions and list open questions before proposing code changes.

    Why it works. This task tests how well Qwen4-Max separates concrete facts from assumptions and structures a multi-step engineering migration plan.

    Try this prompt

Pricing

Qwen4-Max API pricing

From $1.27 per million input tokens and $3.83 per million output tokens.

Get started

How to use the Qwen4-Max API in three steps

  1. Step 1

    Size the output limit for thinking plus answer

    Reasoning tokens count inside max_tokens (default 4,096, ceiling 384,000). Raise the cap whenever you use medium or high effort on long outputs.

  2. Step 2

    Keep stable prefixes for prompt caching

    Place system instructions and large reference documents early in the message list so repeated queries can reuse cached input tokens.

  3. Step 3

    Validate tool arguments in your code

    Define strict JSON schemas for tools, inspect the returned tool calls in your application, and send results back with the matching tool_call_id.

Parameter reference and code samples are in the API and Readme tabs at the top of this page.

FAQ

Qwen4-Max API FAQ

About Qwen4-Max

Qwen4-Max brings a 1,000,000-token input window, 384,000-token output ceiling, vision input, tool calling, and four reasoning levels to one OpenAI-compatible chat call. Use none or low for high-throughput extraction and medium or high when a task spans many files or documents.

Related models and next tasks