All articles

Qwen3.8-Max API Complete Guide: DashScope's 2.4T Flagship with Native Vision

A hands-on guide to Qwen3.8-Max — Alibaba's 2.4-trillion-parameter MoE flagship on DashScope. Covers API setup, pricing, thinking mode, vision input, performance benchmarks, and how to route it through an OpenAI-compatible gateway.

· TheRouter

Qwen3.8-Max is Alibaba's new flagship model, released on August 3, 2026. It is a 2.4-trillion-parameter sparse Mixture-of-Experts model that accepts text, image, and video input and returns text. It ships with a 1M-token context window, native thinking mode, and an OpenAI-compatible API — meaning you can start calling it in under three minutes by changing two lines in any OpenAI SDK client.

We wrote this guide because Qwen3.8-Max represents a significant generational leap over the Qwen3.7 series across coding, agentic, and multimodal benchmarks. If you are evaluating Chinese LLM API providers or looking for a cost-effective frontier-class model, this is the one to test.

Qwen3.8-Max at a Glance

SpecValue
Parameters2.4 trillion (sparse MoE)
ModalityText + Image + Video → Text
Context window1,000,000 tokens
Max input991,232 tokens (983,040 with thinking)
Max output131,072 tokens
Max reasoning budget262,144 tokens
Rate limits2M TPM, 15K RPM
Thinking modeYes (thinking + non-thinking)
Context cacheYes (implicit + explicit)
Batch callingYes (50% off)
Function callingYes
Structured outputYes
API compatibilityOpenAI-compatible, Anthropic-compatible, DashScope native
Model IDqwen3.8-max

Source: Alibaba Cloud Model Studio Pricing, Qwen3.8-Max Blog Post, MarkTechPost coverage. Retrieved 2026-08-03.

Getting Started in 3 Minutes

Step 1: Get a DashScope API Key

Sign up at Alibaba Cloud Model Studio (百炼). Navigate to API Keys in the console sidebar and generate a new key. International users can sign up at Alibaba Cloud International and access Model Studio from there.

Step 2: Install the OpenAI SDK

pip install openai

Step 3: Send Your First Request

OpenAI-compatible means a provider exposes a chat-completions endpoint whose request and response shape matches the OpenAI API contract closely enough that an unmodified OpenAI SDK call works against it after swapping three values: API key, base URL, and model name. The minimum surface in practice is POST /v1/chat/completions with messages, model, and an OpenAI-shaped streaming response.

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-dashscope-api-key",
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
)

response = client.chat.completions.create(
    model="qwen3.8-max",
    messages=[
        {"role": "user", "content": "Explain the difference between MoE and dense transformer architectures in two paragraphs."}
    ],
)

print(response.choices[0].message.content)

That is all it takes. The DashScope endpoint is OpenAI-compatible, so any tool that speaks the OpenAI chat completions protocol — Cursor, Claude Code with a custom endpoint, LiteLLM, or your own SDK wrapper — works out of the box.

Source: Alibaba Cloud OpenAI Compatibility Docs. Retrieved 2026-08-03.

Thinking Mode (Extended Reasoning)

Qwen3.8-Max supports both thinking and non-thinking modes. In thinking mode, the model generates an internal chain-of-thought before producing the final answer, similar to OpenAI's o-series or Claude's extended thinking.

response = client.chat.completions.create(
    model="qwen3.8-max",
    messages=[
        {"role": "user", "content": "Prove that the square root of 2 is irrational."}
    ],
    extra_body={"enable_thinking": True},
    stream=True,
)

for chunk in response:
    delta = chunk.choices[0].delta
    # thinking content arrives in delta.reasoning_content
    # final answer arrives in delta.content
    if hasattr(delta, "reasoning_content") and delta.reasoning_content:
        print(f"[thinking] {delta.reasoning_content}", end="")
    if delta.content:
        print(delta.content, end="")

Key details:

  • Thinking mode uses a separate reasoning budget of up to 262,144 tokens
  • Both thinking tokens and answer tokens count toward output billing
  • When thinking is enabled, max input drops to 983,040 tokens (from 991,232)
  • You can set thinking_budget to control reasoning length

Source: DashScope Text Generation Docs. Retrieved 2026-08-03.

Vision and Video Input

Qwen3.8-Max natively accepts images and video frames. Unlike Qwen3.7-Max (text-only), you do not need to switch to a separate model for multimodal workloads.

Image Input

response = client.chat.completions.create(
    model="qwen3.8-max",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Describe the architecture diagram in this image."},
                {"type": "image_url", "image_url": {"url": "https://example.com/arch-diagram.png"}},
            ],
        }
    ],
)

Video Input

response = client.chat.completions.create(
    model="qwen3.8-max",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Summarize what happens in this video."},
                {"type": "video_url", "video_url": {"url": "https://example.com/demo.mp4"}},
            ],
        }
    ],
)

This is a significant upgrade over the Qwen3.7 series, where you needed Qwen3.7-Plus for vision and Qwen3.7-Max for reasoning. Qwen3.8-Max unifies both in a single model ID.

Pricing Comparison

ModelInput (per 1M tokens)Output (per 1M tokens)Context window
Qwen3.8-Max¥12 (~$1.65)¥36 (~$4.95)1M
Qwen3.7-Max¥12 (50% off promo: ¥6)¥36 (50% off promo: ¥18)1M
Qwen3.7-Plus¥2 (20% off promo: ¥1.60)¥8 (20% off promo: ¥6.40)1M
Qwen3-Max¥2.50–¥7 (tiered)¥10–¥28 (tiered)256K
Claude Opus 4.8$15$75200K
GPT-5.6 Sol

Prices shown are for the China mainland (Beijing) region. International regions (Singapore, US Virginia, Frankfurt, Tokyo) carry different rates. Qwen3.7-Max currently runs a time-limited 50% promotional discount; Qwen3.8-Max launched at standard pricing with no introductory discount announced.

The international pricing for Qwen3.8-Max on the Alibaba Cloud International platform is listed at $2.00 per 1M input tokens and $6.00 per 1M output tokens. Implicit cache reads cost $0.25/1M, explicit cache creation costs $2.50/1M, and explicit cache reads cost $0.17/1M.

Source: Aliyun Model Studio Pricing, QwenCloud Model Page. Retrieved 2026-08-03.

Performance: Qwen3.8-Max vs Qwen3.7-Max

The following benchmark data is from Alibaba's official release announcement. Independent third-party evaluations are not yet available.

BenchmarkQwen3.8-MaxQwen3.7-MaxDelta
Terminal-Bench 2.186.6
SWE-bench Pro67.7
FrontierSWE73.540.7+32.8
DeepSWE 1.156.621.6+35.0
JobBench53.431.3+22.1
PaperBench93.0
GPQA Diamond92.692.4+0.2
IFBench82.8
OSWorld-Verified86.1
OmniDocBench 1.592.1

Caveats:

  • All benchmark data is vendor-reported. Independent evaluations have not been published as of this writing.
  • The multimodal benchmark comparisons in the official blog compare against Qwen3.7-Plus (not Qwen3.7-Max), which flatters the generational delta.
  • Activated parameter count has not been disclosed — only total parameter count (2.4T) is published.

Source: Qwen3.8-Max Blog Post, MarkTechPost Coverage. Retrieved 2026-08-03.

Model IDs and Versioning

DashScope currently lists one model ID for Qwen3.8-Max:

  • qwen3.8-max — the rolling pointer to the latest stable checkpoint

Unlike the Qwen3.7 series (which has dated snapshots like qwen3.7-max-2026-05-20 and qwen3.7-max-2026-06-08), no dated snapshot for Qwen3.8-Max has been published yet. This means the rolling alias is the only option. If version pinning matters for your production workloads, monitor DashScope's newly released models page for snapshot announcements.

For model versioning best practices across providers, see our LLM API Model Versioning and Aliases Guide.

Common Errors and Fixes

ErrorCauseFix
InvalidParameter: model not foundWrong model ID or regionUse qwen3.8-max exactly. Verify your API key belongs to a region where the model is deployed (Beijing, Singapore, US Virginia, Frankfurt, Tokyo).
429 Too Many RequestsRate limit exceededDashScope allows 2M TPM and 15K RPM. Back off with exponential retry. See our error handling reference.
context_length_exceededInput exceeds 991K tokens (or 983K in thinking mode)Truncate or summarize input. Consider using context cache for repeated prefixes.
Thinking tokens not appearing in streamThinking mode not enabledPass extra_body={"enable_thinking": True}. Reasoning content arrives in delta.reasoning_content, not delta.content.
Vision request returns text-only errorImage URL not accessibleEnsure the image URL is publicly accessible. DashScope fetches images server-side. Base64 encoding also works.

Source: DashScope Error Codes. Retrieved 2026-08-03.

Production Checklist

Before shipping Qwen3.8-Max to production, verify:

  • API key rotation — Store keys in a secrets manager, not in code. See our API key management guide.
  • Version pinning strategy — Decide whether to track the rolling qwen3.8-max alias or wait for dated snapshots. Rolling aliases can change behavior without notice.
  • Fallback chain — Set up a fallback to Qwen3.7-Max or another provider for availability. See our fallback routing guide.
  • Cost monitoring — Track token usage per model. Thinking mode can generate up to 262K reasoning tokens per request, which all count toward output billing.
  • Rate limit headroom — 2M TPM and 15K RPM are generous but can be hit by batch workloads. Implement retry with backoff per our timeouts and retries guide.
  • Context cache — For workloads with stable prefixes (system prompts, few-shot examples), enable implicit or explicit context cache to cut input costs by up to 90%.
  • Test multimodal separately — If you are migrating from a text-only model (Qwen3.7-Max), verify that your prompt templates do not accidentally send image_url content that the new model interprets differently.

TheRouter Integration

TheRouter routes OpenAI-compatible requests through configured providers, including DashScope. If your deployment uses TheRouter for provider routing and fallback, you can add Qwen3.8-Max as a model target on the DashScope provider:

  1. Configure DashScope as a provider with your API key and the https://dashscope.aliyuncs.com/compatible-mode/v1 base URL
  2. Add qwen3.8-max as a model entry pointing to the DashScope provider
  3. Optionally set up a fallback chain: qwen3.8-max → qwen3.7-max → qwen3.7-plus

Because both DashScope and TheRouter speak the OpenAI protocol, your application code does not need to change — only the routing configuration does. For setup details, see our Aliyun Bailian API Guide and OpenAI-Compatible API Providers.

Note: Qwen3.8-Max is not yet in TheRouter's models-data.ts as of this writing. Check the DashScope provider page for the latest supported model list.

Related Resources

Customer Support