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 docsFunction Calling
You can use Function Calling to enable the models to interact with the external world by integrating tools.View docsPrefix 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 docsStructured Output
Use structured output to ensure that the model outputs standard JSON strings.View docsWeb Search
When web search is enabled, the model will respond based on retrieved real-time data.View docsBatches
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 docsPricing
- 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 Input991K
- Max Output128K
- Max Input (Thinking)983K
- Max Output (Thinking)128K
- Context1M
- Max Reasoning256K
- TPMTokens Per Minute2000000
Built-in Tools
code_interpreterResponses API
t2i_searchResponses API
i2i_searchResponses API
pdf_parsingCompletions API
API Reference
Call APICopy 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)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)