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. 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
1M context, verified
Three modalities, one model
Much stronger agentic work
Endpoint support
Pricing
Per 1M tokens, pre-discount list price:Specifications
Controlling thinking (the most important section)
Qwen3.8-Max thinks by default, at thexhigh 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: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.
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
url to an https://... address.
Video input
{"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, andparallel_tool_calls: false all verified.
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.
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
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).
2026-08-08 follow-up: multi-turn tool calling itself is fine
A dedicated 300-call retest confirms the multi-turntool_use / tool_result chain itself works. The only blocker is the thinking block:
tool_resulthas no extra format restrictions. String or block-arraycontent,is_errortrue or false, empty results, 50KB results, out-of-order replay, partial replay, fabricatedtool_use_id— all 15 shapes passed. Control characters, emoji, and a 200,000-character single line also passed.- No
signaturevalue saves you. Empty string,null, the key removed entirely, or a fabricated value all return the same 400. You have to drop the whole block. - Stress test passes once stripped. An autonomous agent loop with a 24K-token system prompt and 8 tools, 12 turns × 2 runs, context growing to 28.7K — 24/24 succeeded.
- SSE events are complete:
message_start,content_block_start,content_block_delta,content_block_stop,message_delta,message_stop, plusping.text_delta,thinking_delta,signature_delta, andinput_json_deltaall behave correctly. - No rate or concurrency limit observed: the same request repeated 40 times sequentially all succeeded, and concurrency levels of 1 / 4 / 8 / 16 / 32 all succeeded with no 429s.
What to do if you want it inside Claude Code
For this class of “doesn’t work in one specific client” problem, the limitation may well be on the model side rather than in our adaptation. We suggest verifying the same usage on Alibaba Cloud’s own Bailian platform first (console:bailian.console.aliyun.com):
- if the official platform rejects it too, it is a model-side limitation and there is nothing we can route around;
- if it works there but not here, send us the request body and we will take it up with the channel provider.
Other differences and field notes
response_formatis silently ignored (force a tool call for structured output)tool_choiceonly accepts the OpenAI format; forced tool calling (requiredor a named function) is unsupported in thinking mode on both endpoints- Images must be base64; remote URLs return 400
reasoning_efforthas no effect — usethinking: {"type": "disabled"}to turn thinking offstop_sequencesdoes truncate, butstop_reasonis misreported asend_turnand thestop_sequencefield comes backnull, so do not rely on it to detect why generation stopped- Streaming usage varies by route: on some routes the
input_tokensinmessage_startis unreliable, and on others the final streamedoutput_tokensis always 0. For exact accounting, use the non-streaming usage or your billing records - Measured input ceiling is 983,616 tokens; going over returns
Range of input length should be [1, 983616]
Parameter compatibility
Best practices
Everyday chat and high-volume calls
reasoning_effort="none" explicitly. Measured latency dropped from ~5 s to 2 s, and output tokens to roughly 1/30.Long documents and codebases
Data extraction
json_schema and disable thinking. Conformance is unaffected.Agents and tool orchestration
/v1/chat/completions. Remember to disable thinking when forcing a tool call.FAQ
Why am I still billed a lot of tokens after setting max_tokens?
Why am I still billed a lot of tokens after setting max_tokens?
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.Why does tool_choice with a named function return 400?
Why does tool_choice with a named function return 400?
reasoning_effort="none" alongside it.Why can't I reach /v1/responses?
Why can't I reach /v1/responses?
/v1/chat/completions instead.Can I use this model in Claude Code?
Can I use this model in Claude Code?
/v1/messages endpoint rejects history messages containing thinking blocks, and Claude Code replays them verbatim — so the first turn produces tool_use and the second turn returns 400 once tool_result goes back. When calling from your own code, strip those blocks and the endpoint works fine.If you need to get work done inside Claude Code, the APIYI Claude series or OpenAI series is the easier path — the default group is officially routed and needs no extra adaptation. You can also verify the same usage on Alibaba Cloud’s Bailian platform (bailian.console.aliyun.com) first; if the official platform rejects it too, it is a model-side limitation.Why does the first turn work and then it hangs or errors after I send tool results?
Why does the first turn work and then it hangs or errors after I send tool results?
/v1/messages. The replayed assistant message carries a thinking block, which the endpoint rejects with a 400. Setting signature to an empty string or null, or removing the field, does not help — you must drop the entire thinking block.Once stripped, a 12-turn tool loop at 24K context ran to completion in testing. The multi-turn tool_use / tool_result chain itself is not the problem.Why are reasoning_tokens or cache fields sometimes missing from usage?
Why are reasoning_tokens or cache fields sometimes missing from usage?
reasoning_tokens and cached_tokens, some always report cache_read_input_tokens as 0, and some always report a final streamed output_tokens of 0. This has been reported upstream for alignment.What the API reports is not what you are billed. For exact accounting, use the billing detail on the individual request in the console log, which shows the full calculation for both base and cache charges.Why are video calls so slow?
Why are video calls so slow?
Related
- Qwen3.8-Max playground — send requests directly
- Qwen3.6 series (legacy) — the previous five models
- Qwen3.8-Max launch notes — benchmarks and full write-up
- Model pricing — per-model rates, cache pricing, and available endpoints
- Top-up promotions — stackable discounts