Skip to content
Dashboard

Qwen3 Max

Qwen3 Max is Alibaba Cloud's trillion-parameter MoE language model with a context window of 262.1K tokens, delivering competitive performance on coding, mathematics, and enterprise tool-use tasks.

View API reference
Input and output price
Prices from: Input $0.84, Output $3.38, Per 1M tokens
24h uptime
Loading AI Gateway uptime
import { streamText } from 'ai'
const result = streamText({
model: 'alibaba/qwen3-max',
prompt: 'Why is the sky blue?'
})
Read docs

Copy link to headingPlayground

Try out Qwen3 Max by Alibaba Cloud. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

alibaba logo
alibaba logo

Qwen3 Max

Copy link to headingProviders

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Max Output
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
ZDR
No Training
Free Tier
Release Date
262K33K0.8 s57 tps
$1.20/M+2 more
$6/M+2 more
Read$0.24/M
09/23/2025
262K66K1.2 s55 tps
$0.85/M+2 more
$3.38/M+2 more
09/23/2025

Copy link to headingUptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

Copy link to headingThroughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Copy link to headingLatency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Getting started

Call Qwen3 Max through AI Gateway with the AI SDK generateText and streamText functions, or through the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs by changing the base URL. AI Gateway authenticates the request and routes it to an available provider.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the text generation quickstart.

index.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-max',
prompt: 'Why is the sky blue?',
});
console.log(result.text);
}
main().catch(console.error);

Top-level parameters

The same Qwen3 Max request in each API format AI Gateway supports.

top-level-params.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-max',
system: 'You are a concise technical assistant.',
prompt: 'Summarize the tradeoffs between static generation and SSR.',
maxOutputTokens: 1024,
temperature: 0.5,
});
console.log(result.text);
}
main().catch(console.error);

Standard parameters like prompt, messages, temperature, and tools work as documented in the AI SDK docs. These are the parameters with model-specific behavior.

ParameterTypeRequiredDescription
modelstringYesModel ID in the form creator/model, e.g. alibaba/qwen3-max. AI Gateway routes the request to an available provider.
maxOutputTokensnumberNoHard cap on generated tokens. Qwen3 Max supports up to 65,536 output tokens.
providerOptionsRecord<string, JSONValue>NoAI Gateway routing options under gateway, plus any provider-native options under the provider’s own namespace — see the table below.

Input limits

InputFormatsSourcesMax countMax sizeLimits
TextPrompt and response share the 262K-token context window

Provider options

Set AI Gateway routing options under providerOptions.gateway. For provider-specific options, pass them under the provider’s namespace as documented by the AI SDK.

Learn more in the AI SDK alibaba provider docs.

provider-options.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-max',
prompt: 'Why is the sky blue?',
providerOptions: {
gateway: {
only: ['alibaba', 'novita'],
},
},
});
console.log(result.text);
}
main().catch(console.error);

These AI Gateway routing options apply to every model. Provider-specific options pass through under the provider’s own namespace (for example providerOptions.anthropic) exactly as documented by the AI SDK.

ParameterTypeRequiredDescription
providerOptions.gateway.onlystring[]NoRestrict routing to these provider slugs. Requests fail over only within the listed providers.
providerOptions.gateway.orderstring[]NoPreferred provider order. Listed providers are tried first; unlisted providers remain available as fallbacks.
providerOptions.gateway.sort'cost' | 'ttft' | 'tps'NoRank candidate providers by price, time to first token, or tokens per second instead of the default routing order.
providerOptions.gateway.zeroDataRetentionbooleanNoRoute only to providers with a zero-data-retention policy for this model.

Routing across providers

AI Gateway serves the same model through multiple providers and fails over automatically. order expresses a preference while keeping every provider eligible; only is a hard allowlist — if none of the listed providers are available the request fails instead of falling back.

Options under a provider's own namespace (for example providerOptions.anthropic) are forwarded to that provider with the request. Providers ignore option namespaces that don't apply to them, so it is safe to set provider options alongside gateway routing options.

Tool calling

Expose tools the model can call. Define each tool’s inputs with a Zod schema.

tool-calling.ts
import { generateText, tool } from 'ai';
import { z } from 'zod';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'alibaba/qwen3-max',
prompt: 'What is the weather in San Francisco?',
tools: {
getWeather: tool({
description: 'Get the current weather for a location',
inputSchema: z.object({ location: z.string() }),
execute: async ({ location }) => ({ location, temperatureC: 18 }),
}),
},
});
console.log(result.text);
}
main().catch(console.error);

Copy link to headingMore models by Alibaba Cloud

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
991K3.9 s50 tps
$2/M
$6/M
Read$0.25/M
Write$2.50/M
+2
alibaba logo
09/01/2026
991K1.1 s96 tps
$0.16/M
$0.47/M
Read$0.02/M
Write$0.20/M
+2
alibaba logo
08/26/2026
1M0.6 s133 tps
$0.10/M
$0.40/M
Read$0.01/M
Write$0.63/M
+1
alibaba logo
deepinfra logo
morph logo
+3
08/14/2026
1M2.5 s154 tps
$2/M
$6/M
Read$0.25/M
Write$2.50/M
+1
alibaba logo
fireworks logo
08/02/2026
991K2.5 s140 tps
$0.03/M+2 more
$0.13/M+2 more
Read$0.006/M
Write$0.04/M
+2
alibaba logo
07/28/2026
1M2.0 s58 tps
$0.40/M+1 more
$1.60/M+1 more
Read$0.08/M
Write$0.50/M
+2
alibaba logo
06/02/2026

Copy link to headingAbout Qwen3 Max

Qwen3 Max is the largest model in Alibaba Cloud's Qwen3 line, built on a mixture-of-experts (MoE) architecture with over one trillion total parameters. The MoE design allocates computation selectively, enabling performance without activating the full parameter count on every token.

The context window of 262.1K tokens makes it practical for tasks that earlier-generation models had to split across multiple calls: ingesting entire codebases, indexing long legal or financial documents, or tracking dependencies across extended multi-turn conversations. Context caching further reduces the cost of repeatedly processing the same long prefix.

Qwen3 Max performs strongly on structured-output and tool-use benchmarks, recording 74.8 on Tau2-Bench and 79.3% accuracy on LiveBench. On software engineering tasks measured by SWE-bench Verified, Qwen3 Max scored 69.6. These results reflect a consistent emphasis on reliability for enterprise tasks: JSON generation, HTML/CSS formatting, API function calling, and multi-step agentic workflows where predictable output structure matters.

Alibaba Cloud positions Qwen3 Max with native bilingual strength in Chinese and English, alongside broad multilingual support. The model is available via API only. Weights aren't publicly released.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: For regulated industries requiring data-residency guarantees, cross-reference the geographic deployment region of your chosen provider against applicable compliance frameworks before routing production traffic.
  • Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the documentation for details.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

Copy link to headingWhen to Use Qwen3 Max

Best for

  • Structured enterprise automation: High-volume workloads that require reliable JSON, XML, or formatted report output
  • Long-document analysis: Contracts, scientific papers, and codebases where the full context must remain in-window
  • Multi-step function calling: Complex agentic workflows that chain multiple tool invocations
  • Professional-grade quantitative work: Mathematical reasoning and quantitative problem-solving at expert difficulty
  • Bilingual Chinese-English applications: Products where both languages need equal-quality handling

Consider alternatives when

  • Visible chain-of-thought needed: Consider Qwen3-Max-Thinking when you need extended reasoning with visible step traces
  • Creative and conversational writing: Open-ended storytelling or conversational warmth is the primary requirement
  • Strict token budgets: A smaller open-weight model may meet your quality bar at lower cost per token
  • Latency-critical workloads: Response latency is more important than depth of reasoning

Qwen3 Max brings trillion-parameter scale to tasks that benefit most from it: long-context document work, structured enterprise output, and complex tool use. Its context window of 262.1K tokens and strong benchmark results make it a credible choice for production deployments where reliability and breadth of capability take precedence over speed.

Copy link to headingFrequently Asked Questions

  • How many parameters does Qwen3 Max have?

    The model exceeds one trillion total parameters. It's served as a closed-weight API, and model weights aren't available for download.

  • What is the context window for Qwen3 Max?

    The context window is 262.1K tokens. This supports long document analysis and extended multi-turn sessions.

  • How does Qwen3 Max handle context caching?

    The model supports context caching, allowing repeated long prompts, such as a large system prompt or document, to be processed once and reused across many requests, reducing latency and cost.

  • What is the difference between Qwen3 Max and Qwen3-Max-Thinking?

    Qwen3 Max is optimized for fast, high-quality responses without extended internal reasoning traces. Qwen3-Max-Thinking adds a dedicated thinking mode where the model works through complex problems step by step, making it better suited to hard math, competitive coding, and scientific reasoning at the cost of higher token usage.

  • Does Qwen3 Max support function calling?

    Yes. Qwen3 Max was specifically evaluated on tool-use benchmarks (Tau2-Bench: 74.8) and is designed for multi-step agentic workflows involving structured API calls.

  • Can Qwen3 Max generate outputs in both Chinese and English?

    Yes. Alibaba Cloud positions Qwen3 Max with strong native support for both Chinese and English, alongside broad multilingual capability.

  • How does Qwen3 Max score on coding benchmarks?

    On SWE-bench Verified, Qwen3 Max recorded a score of 69.6, placing it competitively among other models evaluated on software engineering tasks.

Your use is subject to Alibaba Cloud's Terms & Privacy Policies.