Skip to main content
POST
Chat completion: Qwen3.8-Max (OpenAI compatible)
Use the playground on the right to send requests directly: put Bearer sk-your-api-key in Authorization. The example already includes reasoning_effort: "none" — hit send to see the response.
The model thinks by default (tier xhigh, billed as output). The example disables thinking to keep debugging fast and cheap; for hard reasoning, drop the reasoning_effort field and raise max_tokens to 4000+. For the full write-up, see the Qwen3.8-Max overview.

Parameter quick reference

Three easy mistakes

1. max_tokens does not cap thinking. We set max_tokens=1 and were still billed 1,054 output tokens (1,045 of them thinking). Use reasoning_effort="none" to control cost.2. Forced tool calls need thinking off. With tool_choice set to "required" or a named function, thinking mode returns a 400 or silently skips the call — pass reasoning_effort="none" alongside it.3. thinking_budget has no effect. Any value behaves like the low tier; use reasoning_effort instead.

Reading the response

  • The thinking trace is in choices[0].message.reasoning_content (returned while thinking is on)
  • Thinking cost is in usage.completion_tokens_details.reasoning_tokens; cache hits in usage.prompt_tokens_details.cached_tokens
  • Some upstream routes do not report those two fields (roughly one third of requests in testing) — keep this in mind if you need exact thinking-cost accounting
  • The seven legal reasoning_effort values map to only four real tiers; max does not think harder than xhigh
  • An illegal reasoning_effort value returns a 400 listing the full legal set rather than silently downgrading

Authorizations

Authorization
string
header
required

Add Authorization: Bearer YOUR_API_KEY to the request header

Body

application/json
model
string
required

Always qwen3.8-max

messages
object[]
required

Standard OpenAI message array

max_tokens
integer

Output budget for the visible answer, range [1, 131072]. Note: does not bound thinking tokens

reasoning_effort
enum<string>

Thinking tier, default xhigh. Measured to have only four real tiers: none / minimal≡low / medium / high≡xhigh≡max

Available options:
none,
minimal,
low,
medium,
high,
xhigh,
max
temperature
number

Valid range [0.0, 2.0); passing 2 returns 400

top_p
number

Valid range (0.0, 1.0]

top_k
integer
stream
boolean

SSE streaming. This endpoint returns usage in the final chunk even without stream_options

stop
string[]

Stop sequences, verified working

response_format
object

Structured output; json_schema held strictly in testing. Pair it with reasoning_effort: none

tools
object[]

Function calling tool list, verified working

tool_choice
any

auto / none work as-is; required or a named function requires reasoning_effort: none

parallel_tool_calls
boolean

Set false to limit to a single tool call, verified working

n
integer

Number of candidates. Values above 1 require reasoning_effort: none

logprobs
boolean

Response

Chat completion succeeded

id
string
model
string
choices
object[]
usage
object

Usage stats. Some upstream routes do not report reasoning_tokens or cached_tokens