> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# Qwen3.8 Max

> Trillion-scale MoE flagship for coding, long-horizon agents, and professional work, with image and video understanding across a 1M-token context.

![Qwen3.8 Max](https://media.empiriolabs.ai/model-logos/qwen.png)

[Alibaba Cloud](/providers/alibaba) · Text Generation

`POST /v1/chat/completions`

Trillion-scale MoE flagship for coding, long-horizon agents, and professional work, with image and video understanding across a 1M-token context.

## At a glance

| Field               | Value                                                                                                                     |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Model id            | `qwen3-8-max`                                                                                                             |
| Model release date  | 2026-08-03                                                                                                                |
| Input modalities    | Text, Image, Video                                                                                                        |
| Output modalities   | Text                                                                                                                      |
| Context window      | 983.6K                                                                                                                    |
| Weight precision    | -                                                                                                                         |
| Max output tokens   | 131,072                                                                                                                   |
| Region              | Singapore                                                                                                                 |
| Features            | reasoning, vision, multimodal, web_search, code_interpreter, function_calling, structured_output, agentic_coding          |
| Native inference    | No                                                                                                                        |
| New                 | No                                                                                                                        |
| Structured output   | JSON Schema                                                                                                               |
| Supported endpoints | `POST /v1/chat/completions`, `POST /v1/responses`, `POST /v1/messages`, `POST /v1beta/models/qwen3-8-max:generateContent` |
| Alternate model ids | `qwen3.8-max`                                                                                                             |

## Pricing

| Charge                | Spec                    | Rate   |
| --------------------- | ----------------------- | ------ |
| Input                 | per 1M prompt tokens    | \$2.00 |
| Output                | per 1M generated tokens | \$6.00 |
| Web search            | per call when invoked   | \$0.02 |
| Text-to-image search  | per call when invoked   | \$0.02 |
| Image-to-image search | per call when invoked   | \$0.02 |
| Web extractor         | per call when invoked   | \$0.00 |
| Code interpreter      | per call when invoked   | \$0.00 |

## Example request

```bash
curl https://api.empiriolabs.ai/v1/chat/completions \
  -H 'Authorization: Bearer $EMPIRIOLABS_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model": "qwen3-8-max", "messages": [{"role":"user","content":"Hello"}]}'
```

## Parameters

| Parameter                   | Type    | Required | Default   | Description                                                                                                                                                                                                                                                                           |
| --------------------------- | ------- | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `temperature`               | number  | no       | `0.7`     | Sampling temperature. 0 is deterministic and 1.99 is maximum randomness. · Range: 0 – 1.99                                                                                                                                                                                            |
| `top_p`                     | number  | no       | `0.9`     | Nucleus sampling probability mass. Lower values make outputs more focused. · Range: 0 – 1                                                                                                                                                                                             |
| `max_tokens`                | number  | no       | -         | Maximum output tokens. When omitted, the model's own default applies. · Range: 1 – 131072                                                                                                                                                                                             |
| `stop`                      | string  | no       | -         | Up to 4 strings where the model will stop generating further tokens.                                                                                                                                                                                                                  |
| `enable_thinking`           | boolean | no       | true      | Enable reasoning before answering.                                                                                                                                                                                                                                                    |
| `reasoning_effort`          | enum    | no       | -         | Reasoning effort level. none disables thinking. low, medium, high, and max set bounded thinking budgets sized to the selected model. · Allowed: `none`, `low`, `medium`, `high`, `max`                                                                                                |
| `thinking_budget`           | number  | no       | -         | Maximum tokens reserved for reasoning when thinking is enabled. When omitted, the model decides how long to reason. · Range: 1 – 262144                                                                                                                                               |
| `preserve_thinking`         | boolean | no       | true      | Include the reasoning of earlier assistant turns in the model's input on /v1/chat/completions. Return each turn's reasoning unchanged in that assistant message's reasoning_content field. The earlier reasoning is billed as input tokens. Not available when a built-in tool is on. |
| `seed`                      | integer | no       | -         | Random seed for more reproducible sampling. Reusing a seed with the same request returns similar, not always identical, output. · Range: 0 – 2147483647                                                                                                                               |
| `top_k`                     | integer | no       | -         | Sample only from the K most likely tokens. When omitted, the model's own default applies. · Range: 1 – 100                                                                                                                                                                            |
| `presence_penalty`          | number  | no       | -         | Penalty for tokens that already appeared in the generated text. Positive values encourage new topics. When omitted, the model's own default applies. · Range: -2 – 2                                                                                                                  |
| `repetition_penalty`        | number  | no       | -         | Higher values discourage repeated phrasing, and 1 applies no penalty. When omitted, the model's own default applies. Not available when a built-in tool is on, or on /v1/responses. · Range: 0.1 – 2                                                                                  |
| `n`                         | integer | no       | `1`       | Number of answers to return. Above 1 runs only on /v1/chat/completions, with enable_thinking false and without tools, web search or logprobs. The output tokens of every answer are billed. · Range: 1 – 4                                                                            |
| `logprobs`                  | boolean | no       | false     | Return the log probabilities of the answer tokens, not the reasoning, on /v1/chat/completions. Not available when a built-in tool is on.                                                                                                                                              |
| `top_logprobs`              | integer | no       | `0`       | Return up to this many most likely alternatives for each answer token. Needs logprobs set to true. · Range: 0 – 5                                                                                                                                                                     |
| `vl_high_resolution_images` | boolean | no       | true      | Use higher resolution processing for image inputs. Applies when no built-in tool is enabled, and not on /v1/responses.                                                                                                                                                                |
| `max_pixels`                | number  | no       | `2621440` | Maximum pixel count per image when high resolution processing is disabled. · Range: 4096 – 16777216                                                                                                                                                                                   |
| `video_fps`                 | number  | no       | `2`       | Frames per second to sample from video inputs. · Range: 0.1 – 10                                                                                                                                                                                                                      |
| `treat_images_as_video`     | boolean | no       | false     | Treat a sequence of images as video frames.                                                                                                                                                                                                                                           |
| `tool_web_search`           | boolean | no       | false     | Search the web for real-time information. Adds \$0.02 to the request cost for each invoked call. Not used when the request also has function tools, response_format or video input.                                                                                                   |
| `tool_web_extractor`        | boolean | no       | false     | Extract and read content from URLs. Requires Web Search and Thinking. Not used when the request also has function tools, response_format or video input.                                                                                                                              |
| `tool_code_interpreter`     | boolean | no       | false     | Run Python code in a sandbox. Requires Thinking. Not used when the request also has function tools, response_format or video input.                                                                                                                                                   |
| `tool_web_search_image`     | boolean | no       | false     | Search the web for images from text descriptions. Adds \$0.02 to the request cost for each invoked call. Not used when the request also has function tools, response_format or video input.                                                                                           |
| `tool_image_search`         | boolean | no       | false     | Find similar images from an uploaded image. Adds \$0.02 to the request cost for each invoked call. Not used when the request also has function tools, response_format or video input.                                                                                                 |
| `parallel_tool_calls`       | boolean | no       | -         | Allow multiple tool calls in a single assistant turn. When omitted, the model's own default applies.                                                                                                                                                                                  |
| `disable_formatting`        | boolean | no       | false     | Return the answer without EmpirioLabs formatting: citations stay as plain \[N] markers and no References block is added. Applies to streamed responses that use a built-in tool.                                                                                                      |
| `response_format`           | enum    | no       | -         | Constrain the output to valid JSON. Use JSON mode for any JSON object, or supply a JSON Schema to force an exact response shape.                                                                                                                                                      |

## Notes

Text, image, and video input are supported. Web search, web extractor, code interpreter, text-to-image search, and image-to-image search are optional built-in tools exposed through tool\_\* parameters. Web search, text-to-image search, and image-to-image search add \$0.02 for each invoked call; web extractor and code interpreter run at no extra cost. Web extractor requires web search, and both web extractor and code interpreter require thinking. A single request can invoke a tool more than once, and each invoked call is billed. Thinking tokens are billed as output tokens. The qwen3-8-max id always serves the current Qwen3.8 Max build and moves with Alibaba's snapshot upgrades; since September 5, 2026 it serves the qwen3-8-max-0902 snapshot. Use qwen3-8-max-0902 when output must stay pinned to that exact snapshot.

**Per-tool billing (`usage.tool_usage`)**

When this model invokes built-in tools inside a single request, the response carries a normalized `usage.tool_usage` map alongside the token counts:

```json
"usage": {
  "prompt_tokens": 123,
  "completion_tokens": 456,
  "cost_usd": 0.0042,
  "tool_usage": {"web_search": 3, "code_interpreter": 1}
}
```

Tool counts are already factored into `cost_usd` and are surfaced for transparency so you can audit per-tool billing. The field is omitted when no tools were invoked.

## Variants

### `:variant1`

| Field               | Value                                                                                                                              |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Model id            | `qwen3-8-max:variant1`                                                                                                             |
| Model release date  | 2026-08-03                                                                                                                         |
| Region              | China                                                                                                                              |
| Context window      | 983.6K                                                                                                                             |
| Weight precision    | -                                                                                                                                  |
| Max output tokens   | 131,072                                                                                                                            |
| Features            | reasoning, vision, multimodal, web_search, code_interpreter, function_calling, structured_output, agentic_coding                   |
| Native inference    | No                                                                                                                                 |
| Structured output   | JSON Schema                                                                                                                        |
| Batch API           | 35% off list price                                                                                                                 |
| Supported endpoints | `POST /v1/chat/completions`, `POST /v1/responses`, `POST /v1/messages`, `POST /v1beta/models/qwen3-8-max:variant1:generateContent` |

**Pricing**

| Charge                | Spec                    | Rate               |
| --------------------- | ----------------------- | ------------------ |
| Input                 | per 1M prompt tokens    | ~~\$2.00~~ \$1.65  |
| Output                | per 1M generated tokens | ~~\$6.00~~ \$4.951 |
| Web search            | per call when invoked   | \$0.01             |
| Text-to-image search  | per call when invoked   | \$0.01             |
| Image-to-image search | per call when invoked   | \$0.01             |
| Web extractor         | per call when invoked   | \$0.00             |
| Code interpreter      | per call when invoked   | \$0.00             |

**Parameters**

| Parameter                   | Type    | Required | Default   | Description                                                                                                                                                                                                                                                                           |
| --------------------------- | ------- | -------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `temperature`               | number  | no       | `0.7`     | Sampling temperature. 0 is deterministic and 1.99 is maximum randomness. · Range: 0 – 1.99                                                                                                                                                                                            |
| `top_p`                     | number  | no       | `0.9`     | Nucleus sampling probability mass. Lower values make outputs more focused. · Range: 0 – 1                                                                                                                                                                                             |
| `max_tokens`                | number  | no       | -         | Maximum output tokens. When omitted, the model's own default applies. · Range: 1 – 131072                                                                                                                                                                                             |
| `stop`                      | string  | no       | -         | Up to 4 strings where the model will stop generating further tokens.                                                                                                                                                                                                                  |
| `enable_thinking`           | boolean | no       | true      | Enable reasoning before answering.                                                                                                                                                                                                                                                    |
| `reasoning_effort`          | enum    | no       | -         | Reasoning effort level. none disables thinking. low, medium, high, and max set bounded thinking budgets sized to the selected model. · Allowed: `none`, `low`, `medium`, `high`, `max`                                                                                                |
| `thinking_budget`           | number  | no       | -         | Maximum tokens reserved for reasoning when thinking is enabled. When omitted, the model decides how long to reason. · Range: 1 – 262144                                                                                                                                               |
| `preserve_thinking`         | boolean | no       | true      | Include the reasoning of earlier assistant turns in the model's input on /v1/chat/completions. Return each turn's reasoning unchanged in that assistant message's reasoning_content field. The earlier reasoning is billed as input tokens. Not available when a built-in tool is on. |
| `seed`                      | integer | no       | -         | Random seed for more reproducible sampling. Reusing a seed with the same request returns similar, not always identical, output. · Range: 0 – 2147483647                                                                                                                               |
| `top_k`                     | integer | no       | -         | Sample only from the K most likely tokens. When omitted, the model's own default applies. · Range: 1 – 100                                                                                                                                                                            |
| `presence_penalty`          | number  | no       | -         | Penalty for tokens that already appeared in the generated text. Positive values encourage new topics. When omitted, the model's own default applies. · Range: -2 – 2                                                                                                                  |
| `repetition_penalty`        | number  | no       | -         | Higher values discourage repeated phrasing, and 1 applies no penalty. When omitted, the model's own default applies. Not available when a built-in tool is on, or on /v1/responses. · Range: 0.1 – 2                                                                                  |
| `n`                         | integer | no       | `1`       | Number of answers to return. Above 1 runs only on /v1/chat/completions, with enable_thinking false and without tools, web search or logprobs. The output tokens of every answer are billed. · Range: 1 – 4                                                                            |
| `logprobs`                  | boolean | no       | false     | Return the log probabilities of the answer tokens, not the reasoning, on /v1/chat/completions. Not available when a built-in tool is on.                                                                                                                                              |
| `top_logprobs`              | integer | no       | `0`       | Return up to this many most likely alternatives for each answer token. Needs logprobs set to true. · Range: 0 – 5                                                                                                                                                                     |
| `vl_high_resolution_images` | boolean | no       | true      | Use higher resolution processing for image inputs. Applies when no built-in tool is enabled, and not on /v1/responses.                                                                                                                                                                |
| `max_pixels`                | number  | no       | `2621440` | Maximum pixel count per image when high resolution processing is disabled. · Range: 4096 – 16777216                                                                                                                                                                                   |
| `video_fps`                 | number  | no       | `2`       | Frames per second to sample from video inputs. · Range: 0.1 – 10                                                                                                                                                                                                                      |
| `treat_images_as_video`     | boolean | no       | false     | Treat a sequence of images as video frames.                                                                                                                                                                                                                                           |
| `tool_web_search`           | boolean | no       | false     | Search the web for real-time information. Adds \$0.01 to the request cost for each invoked call. Not used when the request also has function tools, response_format or video input.                                                                                                   |
| `tool_web_extractor`        | boolean | no       | false     | Extract and read content from URLs. Requires Web Search and Thinking. Not used when the request also has function tools, response_format or video input.                                                                                                                              |
| `tool_code_interpreter`     | boolean | no       | false     | Run Python code in a sandbox. Requires Thinking. Not used when the request also has function tools, response_format or video input.                                                                                                                                                   |
| `tool_web_search_image`     | boolean | no       | false     | Search the web for images from text descriptions. Adds \$0.01 to the request cost for each invoked call. Not used when the request also has function tools, response_format or video input.                                                                                           |
| `tool_image_search`         | boolean | no       | false     | Find similar images from an uploaded image. Adds \$0.01 to the request cost for each invoked call. Not used when the request also has function tools, response_format or video input.                                                                                                 |
| `parallel_tool_calls`       | boolean | no       | -         | Allow multiple tool calls in a single assistant turn. When omitted, the model's own default applies.                                                                                                                                                                                  |
| `disable_formatting`        | boolean | no       | false     | Return the answer without EmpirioLabs formatting: citations stay as plain \[N] markers and no References block is added. Applies to streamed responses that use a built-in tool.                                                                                                      |
| `response_format`           | enum    | no       | -         | Constrain the output to valid JSON. Use JSON mode for any JSON object, or supply a JSON Schema to force an exact response shape.                                                                                                                                                      |

**Notes**

Text, image, and video input are supported. Web search, web extractor, code interpreter, text-to-image search, and image-to-image search are optional built-in tools exposed through tool\_\* parameters. Web search, text-to-image search, and image-to-image search add \$0.02 for each invoked call; web extractor and code interpreter run at no extra cost. Web extractor requires web search, and both web extractor and code interpreter require thinking. A single request can invoke a tool more than once, and each invoked call is billed. Thinking tokens are billed as output tokens. This id always serves the current Qwen3.8 Max build on the China endpoint and moves with Alibaba's snapshot upgrades. Use qwen3-8-max-0902 when output must stay pinned to the September 2, 2026 snapshot.

**Per-tool billing (`usage.tool_usage`)**

When this model invokes built-in tools inside a single request, the response carries a normalized `usage.tool_usage` map alongside the token counts:

```json
"usage": {
  "prompt_tokens": 123,
  "completion_tokens": 456,
  "cost_usd": 0.0042,
  "tool_usage": {"web_search": 3, "code_interpreter": 1}
}
```

Tool counts are already factored into `cost_usd` and are surfaced for transparency so you can audit per-tool billing. The field is omitted when no tools were invoked.

---

*Machine-readable schema:* `GET https://api.empiriolabs.ai/v1/models/qwen3-8-max`.