⌘K

Qwen3.8 Max

qwen3.8-max

Qwen3.8 Max is a 2.4T-parameter MoE flagship Qwen model for long-horizon coding, agentic work, professional reasoning, long documents, and long video understanding. It supports text, image, and video inputs, a 1M context window, up to 131K output tokens, and function calling / structured outputs through Vtrix Chat Completions with model ID `qwen3.8-max`.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Model notes

qwen3.8-max is the newest Qwen Max-family route. Compared with the existing qwen3.7-max doc, the documented generation ceiling is raised from 65536 to 131072 output tokens. Alibaba Cloud lists the context length as 1000000, maximum input length as 991808, thinking-mode input length as 983616, thinking-mode output length as 131072, and maximum thinking-chain length as 262144.

Supported capabilities include text, image, and video input, text output, function calling, structured output, prefix continuation, context cache, and web search where the upstream region supports it.

Parameters

model string required

Model ID to use for the request

Value: qwen3.8-max


messages array required

Array of message objects representing the conversation history

role string required

Message role

Options: user, assistant, system, developer

content string | array required

Message content. Use a text string for text-only requests, or a multimodal content array for text, image, and video inputs when supported by the selected route


max_tokens integer

Maximum tokens to generate in the completion. Thinking tokens may share the same generation budget depending on the routed upstream.

Range: 1 - 131072


temperature number

Sampling temperature to use

Default: 1.0

Range: 0.0 - 2.0


top_p number

Nucleus sampling parameter

Default: 1.0

Range: 0.0 - 1.0


stream boolean

Whether to stream response incrementally

Default: false


tools array

Tools available to the model, using the OpenAI function tool structure. Use this for function calling when the routed upstream supports it.

type string required

Tool type

Value: function

function object required

Function definition, including name, optional description, and JSON Schema parameters


tool_choice string | object

Controls how the model selects tools

Options: none, auto, required, or an explicit function selection object

Default: auto


response_format object

Format that the model must output. Used for structured outputs when supported by the routed model

type string required

Output format type

Options: text, json_object, json_schema


Response Format

id string

Unique identifier for the completion


object string

Object type, always chat.completion


created integer

Unix timestamp of when the completion was created


model string

The model used for the completion


choices array

Array of completion choices

index integer

Choice index

message object

Generated message

role string

Message role, always assistant

content string

Generated text content

finish_reason string

Reason the model stopped generating


usage object

Token usage statistics

prompt_tokens integer

Number of prompt tokens

completion_tokens integer

Number of generated tokens

total_tokens integer

Total token count