Route requests to
Qwen3.7 Max
with Merge Gateway

Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

What Qwen3.7 Max costs to run

| Vendor | Input / 1M tokens | Output / 1M tokens | Zero data retention | | --- | ---: | ---: | --- | | Alibaba | $0.8250 | $2.4755 | No |

Test Qwen3.7 Max
with Gateway’s Simulator

See a prompt's output, token spend, latency, and more with Qwen3.7 Max.

Route requests to Qwen3.7 Max in minutes

To get started in seconds, add our Gateway Implementation skill to your project, or pick your preferred SDK below. Check out our other quick start skills here.
Install the Merge Gateway SDK
Python
Copied!
1$ pip install merge-gateway-sdk
Send a request
Python
Copied!
1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6    model="openai/gpt-5.2",
7    input=[
8        {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9        {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10    ],
11)
12
13print(response.output[0].content[0].text)
Try a diffrent model
Swap the model string to route to a different provider. No other code changes needed.
Anthropic
Copied!
1response = client.responses.create(
2    model="anthropic/claude-sonnet-4-20250514",
3    input=[
4        {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5        {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6    ],
7)
Point to Gateway
Python
Copied!
1from openai import OpenAI
2
3client = OpenAI(
4    api_key="YOUR_API_KEY",
5    base_url="https://api-gateway.merge.dev/v1/openai",
6)
Send a request
Use the standard chat.completions.create method. No provider prefix needed on the model name.
Python
Copied!
1response = client.chat.completions.create(
2    model="gpt-5.2",
3    messages=[
4        {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5        {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6    ],
7)
8
9print(response.choices[0].message.content)
Install packages
Copied!
1npm install merge-gateway-ai-sdk-provider ai
Create the provider
TypeScript
Copied!
1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4  apiKey: "YOUR_API_KEY",
5});
Send a request
Use generateText to send a request. Model names use the provider/model format.
TypeScript
Copied!
1import { generateText } from "ai";
2
3const { text } = await generateText({
4  model: gateway("openai/gpt-4o"),
5  prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);
If you already have @ai-sdk/openai installed, point it at Gateway with a base URL change:
TypeScript
Copied!
1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4  apiKey: "YOUR_API_KEY",
5  baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged
Install the Merge Gateway SDK
Anthropic SDK
Copied!
1from anthropic import Anthropic
2
3client = Anthropic(
4    api_key="YOUR_API_KEY",
5    base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9    model="claude-sonnet-4-20250514",
10    max_tokens=1024,
11    messages=[
12        {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13    ],
14)
15
16print(message.content[0].text)

Explore other models available in Merge Gateway

model logo
Amazon Nova 2 Lite
model logo
Amazon Nova 2 Sonic
model logo
Amazon Nova Lite
model logo
Amazon Nova Micro
model logo
Amazon Nova Premier
model logo
Amazon Nova Pro
model logo
Claude 3.7 Sonnet
model logo
Claude Haiku 4.5 (20251001)
model logo
Claude Opus 4.6
model logo
Claude Opus 4.7
model logo
Claude Opus 4.8
model logo
Claude Sonnet 4.5
model logo
Claude Sonnet 4.6
model logo
Claude Sonnet 5
model logo
Codestral
model logo
Codestral 25.08
model logo
Command R 08-2024
model logo
Command R+ 08-2024
model logo
Command R7B 12-2024
model logo
DeepSeek R1
model logo
DeepSeek V3
model logo
DeepSeek V3.2
model logo
DeepSeek V4 Flash
model logo
DeepSeek V4 Pro

Qwen3.7 Max FAQ

If you have additional questions about Qwen3.7 Max, we've addressed several more below. Keep in mind that this information was written in June, 2026 and may change over time.

Heading

What other models does Alibaba offer?

Qwen3.7 Max is Alibaba's current frontier reasoning flagship, sitting at the top of a broad Qwen model family that spans open-weight, multimodal, and cost-efficient tiers. Here are some other models Alibaba supports:

  • Qwen3.5 397B A17B: Qwen3.5 397B A17B is the flagship open-weight MoE reasoning model in the Qwen3.5 generation with 397 billion total parameters, a 262k-token context window, and an Intelligence Index score of 45, offering strong reasoning capability under an Apache 2.0 license for teams that need self-hostable large-scale MoE deployment
  • Qwen3.6 Plus: Qwen3.6 Plus is a proprietary mid-tier reasoning model released in April 2026, scoring 50 on the Intelligence Index with a 1M-token context window and multimodal input support, priced at $0.50 per 1M input and $3.00 per 1M output, sitting between Qwen3.5 and Qwen3.7 Max in both capability and cost
  • Qwen3.5 Plus: Qwen3.5 Plus is a hosted multimodal model supporting text, image, and video inputs with a 1M-token context window at $0.30 per 1M input and $1.80 per 1M output, suited for long-context agentic workflows and cost-sensitive applications that do not require Qwen3.7 Max's frontier reasoning depth
  • Qwen3.5 Flash: Qwen3.5 Flash is Alibaba's most cost-accessible hosted model at $0.10 per 1M input and $0.40 per 1M output with a 1M-token context window, designed for high-volume workloads where speed and cost efficiency matter more than peak benchmark performance
  • Qwen3 Coder 480B A35B: Qwen3 Coder 480B A35B is a 480-billion-parameter MoE model specialized for code generation with a 262k-token context window (extendable to 1M via YaRN), priced at $0.30 per 1M input and $1.80 per 1M output, the preferred choice for agentic programming tasks within the Alibaba ecosystem

How does Qwen3.7 Max differ from Alibaba's other models?

Qwen3.7 Max is Alibaba's highest-capability proprietary model as of its May 2026 release, distinguished from earlier Qwen generations by its frontier reasoning scores, 1M-token native context, and extended-thinking mode.

  • Intelligence Index score: Qwen3.7 Max scores 57 on the Artificial Analysis Intelligence Index, ranked in the top 10 of over 150 evaluated models. Qwen3.6 Plus scores 50 and Qwen3.5 397B A17B scores 45. This gap represents a meaningful step up in capability for complex reasoning, scientific, and competitive benchmark tasks
  • Benchmark performance: Qwen3.7 Max posts 92.4 on GPQA Diamond, 97.1 on HMMT 2026 February, 80.4 on SWE-Verified, and 44.5 on Apex. It scores 56.6 on the Intelligence Index in a tier that places it between Gemini 3.5 Flash (55.3) and Claude Opus 4.7 (57.3), trailing GPT-5.5 (60.2)
  • Speed: Qwen3.7 Max generates output at 182.7 tokens per second, substantially faster than the open-weight Qwen3.5 397B A17B at 52.1 tokens per second and Qwen3.5 Omni Plus at 52.5 tokens per second, making it the fastest large-scale Alibaba model available through the API
  • Pricing: Qwen3.7 Max is priced at $2.50 per 1M input, $7.50 per 1M output, and $0.25 per 1M cached input tokens, a 90% cache discount. This pricing is significantly higher than Qwen3.5-Flash ($0.10 input, $0.40 output) or Qwen3.5-Plus ($0.30 input, $1.80 output), reflecting its flagship positioning
  • Context window: Qwen3.7 Max supports a native 1M-token context window with a maximum output of 65,536 tokens per request. Earlier open-weight models such as Qwen3.5 397B A17B are limited to 262k tokens, and the original Qwen3-235B-A22B is capped at 33k tokens

Qwen3.7 Max is best suited for teams running complex reasoning, agentic coding, or long-context scientific tasks where frontier benchmark performance justifies the higher per-token cost, and where Alibaba API throughput and latency meet production requirements.

What models should I consider using alongside Qwen3.7 Max?

No single model is optimal for every task. Here are models worth pairing with Qwen3.7 Max depending on what your product needs:

  • Qwen3.5 Flash (Alibaba): For high-volume, lower-complexity requests in the same provider ecosystem, route to Qwen3.5-Flash at $0.10 input and $0.40 output per 1M tokens. Reserving Qwen3.7 Max for only the tasks that require its reasoning depth can reduce total inference costs significantly without switching providers
  • Claude Opus 4.7 (Anthropic): For tasks where you need a second frontier-tier model as a reliability backstop or where Anthropic's instruction-following characteristics better match your output format requirements, Claude Opus 4.7 (scoring 57.3 on the Intelligence Index) provides near-equivalent capability from a separate provider
  • GPT-5.5 (OpenAI): When a task requires the highest available general reasoning score and Qwen3.7 Max falls slightly short (GPT-5.5 scores 60.2 on the Intelligence Index versus Qwen3.7 Max's 56.6), routing those specific requests to GPT-5.5 adds a higher-ceiling option without restructuring your integration
  • Gemini 3.5 Flash (Google): For latency-sensitive tasks where Qwen3.7 Max's verbosity or token generation overhead is too slow, Gemini 3.5 Flash at a comparable Intelligence Index score of 55.3 offers Google's production-grade speed infrastructure as a faster alternative for time-constrained workloads
  • Qwen3 Coder 480B A35B (Alibaba): For large-scale, code-specific generation tasks where Qwen3 Coder's specialized training outperforms Qwen3.7 Max's general-purpose coding capability at lower output cost ($1.80 versus $7.50 per 1M output tokens), route coding-heavy requests to Qwen3 Coder and reserve Qwen3.7 Max for the reasoning and analysis components

What are the challenges of using Qwen3.7 Max in my product?

Like any production LLM, Qwen3.7 Max comes with tradeoffs worth planning for:

  • Output verbosity: Qwen3.7 Max generated 97M output tokens during Intelligence Index evaluation, compared to a median of 35M for comparable models. This verbosity significantly increases per-request output costs and can make response streaming feel slow on tasks that do not require exhaustive answers. Output length controls and stop sequences are important configuration steps before production deployment
  • Cost at scale: At $7.50 per 1M output tokens, Qwen3.7 Max is expensive relative to most of Alibaba's own lineup and many competing frontier models. Combined with its tendency toward verbose output, token costs compound quickly at high request volumes without active budget management
  • Closed-weight proprietary model: Qwen3.7 Max is a closed-weight, DashScope API-only model. Unlike open-weight Alibaba models such as Qwen3.5 397B A17B, it cannot be self-hosted, fine-tuned, or deployed on third-party infrastructure, which limits customization options and creates full provider dependency on Alibaba's API availability
  • Provider dependency: Relying on Alibaba's DashScope API as a single provider creates fragility when the provider has an outage or deprecates a model version. Qwen3.7 Max is a recently released proprietary model with limited public uptime history, making failover planning more critical than for providers with multi-year API track records
  • Attempt rate and abstention: Qwen3.7 Max has a documented attempt rate of 48.0% on certain evaluation benchmarks, lower than comparable models, reflecting a higher abstention rate. For production applications that require the model to always produce an output, abstention behavior should be evaluated and prompt-engineered before deployment

Why should I use Merge Gateway to route LLM requests with Qwen3.7 Max and every other model?

Using Qwen3.7 Max through Merge Gateway gives you access to the model itself and the infrastructure layer around it:

  • One API, every provider: Access Qwen3.7 Max alongside Claude Opus, GPT-5.5, and every other major LLM through a single endpoint and API key. Routing traffic away from Qwen3.7 Max to a cheaper tier model, or failing over to a different provider during an outage, requires only a model string swap with no code changes
  • Intelligent routing and automatic failover: Merge routes around Alibaba outages automatically. Routing policies based on cost, latency, or quality can reduce spend by 40 to 60% without touching your application code, particularly useful given Qwen3.7 Max's high output-token pricing
  • Cost governance: Set hard or soft project budgets so Qwen3.7 Max spend stays within plan. Every request is attributed to a model, project, and tag in a unified billing dashboard across all providers
  • Build Your Own Router: Define what "best" means for your traffic by selecting from curated ML benchmarks or adding your own eval scores. The router scores each available model against your weights and picks the winner per request, with a plain-language explanation of every decision
  • Security and compliance controls: Apply DLP rules and prompt injection protection before every request reaches Alibaba. Enforce per-project model and region policies without adding that logic to your application

How can I start routing requests to Qwen3.7 Max via Merge Gateway?

Getting Qwen3.7 Max running through Merge Gateway takes a few minutes:

1. Create an account and get your API key from the dashboard.

2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.

3. Make your first request using the provider/model format. For Qwen3.7 Max, the model string is alibaba/qwen3.7-max. Swap the model string to route to any other provider without changing anything else.

4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. Your first policy can be as simple as naming Qwen3.7 Max as primary with one fallback.

Full setup instructions and SDK references are in the Merge Gateway docs.

Try Qwen3.7 Max through Merge Gateway

Route, observe, and control AI requests across providers from one API.