Skip to main content
Qwen3.8-Max (qwen3.8-max) is Alibaba Qwen’s new flagship, released August 3, 2026. It is a sparse MoE model with 2.4 trillion total parameters, a 1M context window, 131K max output, and native support for text, image, and video input. APIYI listed it the day it shipped and ran 586 live test calls against it — the capability matrix, parameter behavior, and billing notes on this page all come from those tests rather than from restating official documentation.
Qwen3.8-Max is live on APIYI: model name qwen3.8-max. Thinking is on by default (at the xhigh tier, and thinking tokens are billed as output), so set reasoning_effort="none" explicitly for everyday chat — in testing this took output from roughly 158 tokens down to 5. For the previous generation, see Qwen3.6 series (legacy).

Why this model

17.5% below official

$1.65 input, $4.95 output per 1M tokens versus Alibaba Cloud’s $2/$6. Top-up promotions stack on top.

1M context, verified

Across 8K / 32K / 128K bodies with markers buried mid-document and at the tail, both endpoints recalled all 6/6 exactly. A 128K call takes about 80 seconds.

Three modalities, one model

Text, image, and video input all verified working — no switching between a “long-context model” and a “vision model.”

Much stronger agentic work

FrontierSWE rose from the previous generation’s 40.7 to 73.5, DeepSWE from 21.6 to 56.6. The tool-calling chain is complete, with two-round round-trips verified.

Endpoint support

Pricing

Per 1M tokens, pre-discount list price: Top-up promotions stack on top for a lower effective cost.

Specifications

Official benchmarks: GPQA Diamond 92.6, PaperBench 93.0, OmniDocBench 1.5 92.1, Terminal-Bench 2.1 86.6, OSWorld-Verified 86.1, IFBench 82.8, FrontierSWE 73.5, SWE-bench Pro 67.7.

Controlling thinking (the most important section)

Qwen3.8-Max thinks by default, at the xhigh tier. Thinking tokens are billed as output and frequently account for over 90% of it.

Seven values, four real tiers

The parameter accepts 7 values but maps to only 4 real tiers in practice: Passing max does not think harder than xhigh. Any other value returns a 400 listing the legal set.

How to turn thinking off

enable_thinking: false in extra_body and chat_template_kwargs: {"enable_thinking": false} are equivalent and also work.
max_tokens does not bound thinking tokens. We set max_tokens=1 and were still billed 1,054 output tokens, 1,045 of them thinking.max_tokens only truncates the visible answer. Use reasoning_effort to control cost — do not rely on max_tokens.

thinking_budget has no effect

Passing 128 / 512 / 4096 all behave identically to the low tier; the number itself is ignored. Use reasoning_effort instead.

Code examples

Python (OpenAI SDK compatible)

Image input

Remote image URLs also work on this endpoint — just set url to an https://... address.

Video input

Video understanding took 144–285 seconds per call in testing. Set your client timeout above 300 seconds and prefer streaming or an async task queue.
There is also a frame-sequence form, {"type": "video", "video": [frame1, frame2, ...]}, which requires 4–8000 frames — fewer than 4 returns a 400.

cURL

Tool calling

Tool calling on the Chat Completions endpoint is fully working: single tool, parallel tools, two-round round-trip, picking 1 out of 20 tools, streaming deltas, and parallel_tool_calls: false all verified.
Forced tool calls require thinking off. When tool_choice is "required" or names a specific function, you must also set reasoning_effort="none" — otherwise you get a 400 (tool_choice does not support being set to required or object in thinking mode) or the call is silently skipped.tool_choice set to "auto" / "none" is unaffected. The same applies to n > 1.

Structured output

response_format with json_schema held strictly in testing: nested objects, enums, arrays, and additionalProperties: false all took effect, with no extra fields and no Markdown fences.
Disable thinking for structured output. Same schema, measured side by side:Conformance was identical; cost and latency differ by an order of magnitude.

Context caching

  • Hit threshold around 1,024 tokens: an 818-token prefix missed; 1,070 tokens and up hit
  • Real multi-turn conversations do hit: appending messages turn by turn hit on every round
  • Long documents benefit most: 98.6% cached input at 128K, 99.3% at 32K
Cache hits were not stable in testing — the same prefix hit on some rounds and missed on others, and TTL cannot be reliably inferred from the API response. Treat caching as a bonus when it happens; do not build cost projections on it.

Using the Anthropic endpoint

/v1/messages works for code integration, but you must strip thinking blocks before replaying history, otherwise you get a 400 (if content is list. item must be dict and key[type] should in dict).
With that filter in place, we verified 3-turn cross-turn memory, a two-round tool round-trip, and tool results persisting into later turns.
Off-the-shelf clients such as Claude Code are not usable yet — they replay history content blocks verbatim by default and their behavior cannot be changed, so the second turn returns 400. Use /v1/chat/completions instead.
Other differences on this endpoint: response_format is silently ignored (force a tool call for structured output), tool_choice only accepts the OpenAI format, images must be base64 (remote URLs return 400), and reasoning_effort has no effect (use thinking: {"type": "disabled"} to turn thinking off).

Parameter compatibility

Best practices

Everyday chat and high-volume calls

Set reasoning_effort="none" explicitly. Measured latency dropped from ~5 s to 2 s, and output tokens to roughly 1/30.

Long documents and codebases

128K recall was exact in testing, and long-document cache hit rates are high. Put the large document early in the message list and the question at the tail.

Data extraction

Constrain with json_schema and disable thinking. Conformance is unaffected.

Agents and tool orchestration

Use /v1/chat/completions. Remember to disable thinking when forcing a tool call.

FAQ

max_tokens bounds only the visible answer, not the thinking portion. We measured 1,054 output tokens billed at max_tokens=1. Use reasoning_effort="none" to control cost.
Forced tool choice is not supported while thinking is on. Pass reasoning_effort="none" alongside it.
This endpoint is not wired up for the model yet — all 30 test calls failed, with the error code alternating between 404 and 400. It has been reported upstream, and we will announce it in Live Updates once it is available. Use /v1/chat/completions instead.
Not yet. The /v1/messages endpoint rejects history messages containing thinking blocks, and Claude Code replays them verbatim. When calling from your own code, strip those blocks and the endpoint works fine.
The model is served over more than one upstream route, and one of them does not report reasoning_tokens or cached_tokens — measured at roughly one third of chat requests. This has been reported upstream for alignment. Keep it in mind if you need exact thinking-cost accounting.
Video understanding measured 144–285 seconds per call; this is the model’s own processing time. Set your timeout above 300 seconds and consider an async queue.
Measurements on this page come from 586 live calls on 2026-08-03 (12:50–14:35 UTC+8). Billing-related conclusions are based on the usage fields returned by the API and were not cross-checked line by line against invoices. Model and gateway behavior may change as channels are adjusted — treat live calls as the source of truth.