← All models

Qwen: Qwen4 Max

qwen/qwen4-max
Qwen4 Max is the flagship model in Alibaba's Qwen4 series. It accepts text, image, and video input and returns text, with a 1M-token context window and reasoning enabled by default. Reasoning effort can be set to low, high, or xhigh (default high), or reasoning can be turned off. Tool calling and structured outputs are supported.
Modalities
Price in / out
Cache, read / write
Context / Max output
1M / 131K
Released
Nov 16, 2026

Parameters

messagesrequired
reasoning_effortoff · low · high · xhigh
max_tokensoptional · alias max_completion_tokens
streamtrue · false
toolsfunction calling (OpenAI format)
tool_choiceauto · none · required
response_formatjson_object · json_schema
web_search · ·
providerrouting: order · only · ignore · sort
stream_options{"include_usage": true}
image_urlimage (data: URL)
Fine-tuning · 9
temperature0–2
stopoptional
seedoptional
top_p0–1
top_koptional
frequency_penalty−2…2
presence_penalty−2…2
logprobstrue · false
top_logprobs0–20

How to use via API

from openai import OpenAI

client = OpenAI(base_url="https://api.mixen.ai/v1", api_key="mxn-...")
resp = client.chat.completions.create(
    model="qwen/qwen4-max",
    messages=[{"role": "user", "content": "Привет"}],
    reasoning_effort="low",  # off · low · high · xhigh
    temperature=0.7,
    max_tokens=1024,
    stream=False,
)
print(resp.choices[0].message.content)

# Стриминг: stream=True — ответ приходит чанками
for chunk in client.chat.completions.create(
    model="qwen/qwen4-max",
    messages=[{"role": "user", "content": "Привет"}],
    stream=True,
):
    print(chunk.choices[0].delta.content or "", end="", flush=True)
API docsTry in the bot