Qwen3.8-Max

Copy success!
Try AIAdd to Compare

Overview

2.4-trillion-parameter MoE flagship delivering a comprehensive leap in coding and professional work. Autonomously codes and delivers complete projects spanning 10+ days. Handles hundreds of specialized tasks across legal, financial, design, and other professional domains, producing production-grade results end-to-end in a single conversation. Native visual understanding runs through the full cycle of planning, execution, and verification, enabling deep semantic analysis of ultra-long documents and extended video content. In long-horizon tasks, plans autonomously, iterates through closed feedback loops, and continuously evolves.

Input

ImageTextVideo

Output

Text

Features

Cache

Context Cache caches the prefix of long-context requests, reducing redundant computation during inference. This improves response speed and lowers your usage costs.View docs

Function Calling

You can use Function Calling to enable the models to interact with the external world by integrating tools.View docs

Prefix Completion

You can use partial mode when calling the Qwen API to ensure the model strictly generates text based on your provided initial content.View docs

Structured Output

Use structured output to ensure that the model outputs standard JSON strings.View docs

Web Search

When web search is enabled, the model will respond based on retrieved real-time data.View docs

Batches

For scenarios that do not require real-time responses, batch allows large-scale offline data processing at only 50% of the cost of real-time inference. It significantly reduces resource consumption and operational costs.View docs

Pricing

  • Input
    $2Per 1M tokens
  • Output
    $6Per 1M tokens
  • Input(Implicit Cache)
    $0.25Per 1M tokens
  • Input(Batch File)
    $1Per 1M tokens
  • Output(Batch File)
    $3Per 1M tokens
  • 5-Minute Explicit Cache Creation
    $2.5Per 1M tokens
  • Explicit Cache Read
    $0.17Per 1M tokens

Rate Limits & Context

  • Max Input
    991K
  • Max Output
    128K
  • Max Input (Thinking)
    983K
  • Max Output (Thinking)
    128K
  • Context
    1M
  • Max Reasoning
    256K
  • TPMTokens Per Minute
    2000000

Built-in Tools

code_interpreterResponses API
Web Extractorweb_extractorResponses API
Web Searchweb_searchResponses API
t2i_searchResponses API
i2i_searchResponses API
pdf_parsingCompletions API
Web Extractorweb_fetchAnthropic API
Web Searchweb_searchAnthropic API

API Reference

Call API
Copy success!
123456789101112131415161718192021222324252627282930
from openai import OpenAI
import os

client = OpenAI(
    # If the environment variable is not set, replace it with your Model Studio API key: api_key="sk-xxx"
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    base_url="https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1",
)

messages = [{"role": "user", "content": "Who are you"}]
completion = client.chat.completions.create(
    model="qwen3.8-max",  # You can replace this with another deep thinking models
    messages=messages,
    extra_body={"enable_thinking": True},
    stream=True
)
is_answering = False  # Indicates whether the response phase has started
print("\n" + "=" * 20 + "Thinking process" + "=" * 20)
for chunk in completion:
    if not chunk.choices:
        continue
    delta = chunk.choices[0].delta
    if hasattr(delta, "reasoning_content") and delta.reasoning_content is not None:
        if not is_answering:
            print(delta.reasoning_content, end="", flush=True)
    if hasattr(delta, "content") and delta.content:
        if not is_answering:
            print("\n" + "=" * 20 + "Full response" + "=" * 20)
            is_answering = True
        print(delta.content, end="", flush=True)
Copy success!
123456789101112131415161718192021222324252627282930
from openai import OpenAI
import os

client = OpenAI(
    # If the environment variable is not set, replace it with your Model Studio API key: api_key="sk-xxx"
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    base_url="https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1",
)

messages = [{"role": "user", "content": "Who are you"}]
completion = client.chat.completions.create(
    model="qwen3.8-max",  # You can replace this with another deep thinking models
    messages=messages,
    extra_body={"enable_thinking": True},
    stream=True
)
is_answering = False  # Indicates whether the response phase has started
print("\n" + "=" * 20 + "Thinking process" + "=" * 20)
for chunk in completion:
    if not chunk.choices:
        continue
    delta = chunk.choices[0].delta
    if hasattr(delta, "reasoning_content") and delta.reasoning_content is not None:
        if not is_answering:
            print(delta.reasoning_content, end="", flush=True)
    if hasattr(delta, "content") and delta.content:
        if not is_answering:
            print("\n" + "=" * 20 + "Full response" + "=" * 20)
            is_answering = True
        print(delta.content, end="", flush=True)