Skip to content
Dashboard

Qwen3 Max Preview

Qwen3 Max Preview is Alibaba Cloud's early-access release of its trillion-parameter Qwen3-Max model, providing developers with ahead-of-schedule access to Qwen3-Max capabilities for evaluation and prototyping.

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

Copy link to headingPlayground

Try out Qwen3 Max Preview 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 Preview

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
262K33K1.0 s90 tps
$1.20/M+2 more
$6/M+2 more
Read$0.24/M
09/05/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 Preview 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-preview',
prompt: 'Why is the sky blue?',
});
console.log(result.text);
}
main().catch(console.error);

Top-level parameters

The same Qwen3 Max Preview 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-preview',
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-preview. AI Gateway routes the request to an available provider.
maxOutputTokensnumberNoHard cap on generated tokens. Qwen3 Max Preview supports up to 32,768 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-preview',
prompt: 'Why is the sky blue?',
providerOptions: {
gateway: {
only: ['alibaba'],
},
},
});
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-preview',
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
991K4.0 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 s160 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 Preview

Qwen3 Max Preview reflects the state of Alibaba Cloud's trillion-parameter Qwen3-Max model ahead of its general availability cutover. Teams that need to assess model behavior before committing to Qwen3-Max in production, evaluating output formatting, instruction-following fidelity, or multilingual quality, can do so through the preview identifier without waiting for the GA release window.

The preview shares the same mixture-of-experts (MoE) architecture as the production release, with more than one trillion total parameters and a context window extending to 262.1K tokens. Its capability profile spans mathematics, coding, structured output, and multilingual dialogue.

The practical value of the preview designation is continuity: developers who build and test against Qwen3 Max Preview can observe the model's behavior in realistic conditions, validate prompt templates, and instrument cost estimates before the production model reaches its stable pricing tier. Because AI Gateway abstracts the underlying provider endpoint, migrating from the preview to the GA identifier requires only a model string change in your application configuration.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: Preview models may have evolving rate limits or capability changes; confirm the stability guarantees of your chosen provider's preview access before building critical production paths.
  • 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 Preview

Best for

  • Pre-GA evaluation: Assessing trillion-parameter model behavior before committing production workloads to Qwen3-Max GA
  • Prototyping against a near-final model: Iterating on prompt structures, output schemas, and retrieval-augmented workflows
  • Early-access benchmarking: Internal A/B testing that requires access to a frontier-scale model ahead of GA
  • Schema validation ahead of rollout: Developer teams validating JSON formatting and tool-calling schemas prior to production

Consider alternatives when

  • GA stability required: Migrate to Qwen3-Max once it reaches GA when your use case demands stability guarantees
  • Reasoning-intensive workloads: Consider Qwen3-Max-Thinking when visible chain-of-thought is needed
  • Latency-sensitive traffic: Capacity constraints on preview access can cause unacceptable latency variance
  • Budget predictability: Preview pricing periods can create uncertainty for teams that need stable per-token costs

Qwen3 Max Preview offers a structured way to integrate a large-scale language model from Alibaba Cloud into your stack before it reaches general availability. Because provider routing and authentication are handled through AI Gateway, transitioning to the GA model is a single-line configuration change, making the preview period genuinely useful for integration work rather than just experimentation.

Copy link to headingFrequently Asked Questions

  • What is the relationship between Qwen3 Max Preview and Qwen3-Max?

    Qwen3 Max Preview provides early access to the same underlying trillion-parameter model. The preview designation signals ahead-of-GA access; capability and architecture are the same as the production release.

  • Are there rate limits specific to the preview version?

    Preview models may be subject to capacity-based rate limits that differ from the GA release.

  • How large is the context window on Qwen3 Max Preview?

    262.1K tokens, matching the Qwen3-Max production release.

  • Will my prompts built for the preview work with the GA model?

    In most cases yes, since the models share the same architecture and training. Thorough regression testing before switching identifiers is recommended, as minor behavioral changes can occur between preview and GA.

  • Does the preview support context caching?

    Context caching availability depends on the serving provider; confirm support at your chosen provider before designing a caching strategy around repeated long prompts.

  • What coding and math benchmarks has the underlying model been evaluated on?

    The underlying Qwen3-Max model scored 69.6 on SWE-bench Verified and 79.3% on LiveBench, with competitive results on AIME mathematical reasoning tasks.

  • Is it possible to access the model weights for Qwen3 Max Preview?

    No. Qwen3-Max is a closed-weight model available only via API, both in preview and GA form.

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