Qwen4-Max

Qwen4-Max is the flagship multimodal model in Alibaba's Qwen4 family, built for coding, office productivity, front-end design, and complex agent tasks. It builds on Qwen3.8-Max with stronger world knowledge, perception, and professional tool use, and it accepts text, images, and video with a 1M-token context window, configurable reasoning effort, function calling, and JSON Schema output. It is well suited to coding agents, screenshot and document analysis, and agents that operate graphical interfaces.

Complete technical specification for integration
Qwen4-Max is served through Runware's compatible endpoints, which take another provider's request format. Point the SDK you already use at Runware by changing the base URL and the API key, and set model to alibaba:qwen@4-max.
Requests and responses keep the provider's format, so its reference documents every parameter.
| Endpoint | Format |
|---|---|
/v1/chat/completions | OpenAI Chat Completions |
/v1/responses | OpenAI Responses |
Chat Completions
curl -X POST https://api.runware.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "alibaba:qwen@4-max",
"messages": [{"role": "user", "content": "What is the capital of France?"}]
}'from openai import OpenAI
client = OpenAI(
api_key="your_runware_api_key",
base_url="https://api.runware.ai/v1",
)
response = client.chat.completions.create(
model="alibaba:qwen@4-max",
messages=[{"role": "user", "content": "What is the capital of France?"}],
)
print(response.choices[0].message.content)import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'your_runware_api_key',
baseURL: 'https://api.runware.ai/v1',
});
const response = await client.chat.completions.create({
model: 'alibaba:qwen@4-max',
messages: [{ role: 'user', content: 'What is the capital of France?' }],
});
console.log(response.choices[0].message.content);import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { generateText } from 'ai';
const runware = createOpenAICompatible({
name: 'runware',
apiKey: 'your_runware_api_key',
baseURL: 'https://api.runware.ai/v1',
});
const { text } = await generateText({
model: runware('alibaba:qwen@4-max'),
prompt: 'What is the capital of France?',
});
console.log(text);from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="alibaba:qwen@4-max",
api_key="your_runware_api_key",
base_url="https://api.runware.ai/v1",
)
response = llm.invoke("What is the capital of France?")
print(response.text)Compatible APIs covers streaming, tool calling and how the endpoint differs from OpenAI, and the OpenAI API reference lists every parameter.
Responses
curl -X POST https://api.runware.ai/v1/responses \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "alibaba:qwen@4-max",
"input": "What is the capital of France?"
}'from openai import OpenAI
client = OpenAI(
api_key="your_runware_api_key",
base_url="https://api.runware.ai/v1",
)
response = client.responses.create(
model="alibaba:qwen@4-max",
input="What is the capital of France?",
)
print(response.output_text)import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'your_runware_api_key',
baseURL: 'https://api.runware.ai/v1',
});
const response = await client.responses.create({
model: 'alibaba:qwen@4-max',
input: 'What is the capital of France?',
});
console.log(response.output_text);import { createOpenAI } from '@ai-sdk/openai';
import { generateText } from 'ai';
const runware = createOpenAI({
apiKey: 'your_runware_api_key',
baseURL: 'https://api.runware.ai/v1',
});
const { text } = await generateText({
model: runware.responses('alibaba:qwen@4-max'),
prompt: 'What is the capital of France?',
});
console.log(text);from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="alibaba:qwen@4-max",
api_key="your_runware_api_key",
base_url="https://api.runware.ai/v1",
use_responses_api=True,
)
response = llm.invoke("What is the capital of France?")
print(response.text)Compatible APIs covers conversation state and function calls, and the OpenAI API reference lists every parameter.