Alibaba: Qwen4 Max
LLM NewAlibaba Qwen4 Max model ($1.5/$4.5 per 1M tokens) with 1M context and 95% prompt cache read savings.
Pricing & Cost Calculator
Per-1M token pricing on OpenDesign Go.
| Input Length | Input | Output | Cache Read | Cache Write |
|---|---|---|---|---|
| Standard | $1.5 | $4.5 | $0.075 | $1.875 |
Specs & Parameters
| Parameter | Type | Value / Support |
|---|---|---|
| model | string | qwen4-max |
| messages / input | array | text, image, video |
| max_tokens | integer | ≤ 131,072 |
| stream | boolean | SSE token streaming |
| reasoning_effort | string | none / low / medium / high (default: medium) |
| tools / response_format | object | Function calling & JSON schema |
Routing, Reliability & Privacy
Managed upstream routing with automatic failover, locked public pricing, and zero data retention.
API
Call qwen4-max using OpenAI Compatible (Chat / Responses).
Set your OpenDesign Go API key
export COROUTER_API_KEY="YOUR_API_KEY" # Base URL: https://amr-link.open-design.ai/v1
Make your first request
curl https://amr-link.open-design.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $COROUTER_API_KEY" \
-d '{
"model": "qwen4-max",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Refactor this API handler for streaming responses." }
]
}'import os
from openai import OpenAI
client = OpenAI(
base_url="https://amr-link.open-design.ai/v1",
api_key=os.environ["COROUTER_API_KEY"],
)
response = client.chat.completions.create(
model="qwen4-max",
max_tokens=1024,
messages=[
{"role": "user", "content": "Refactor this API handler for streaming responses."}
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://amr-link.open-design.ai/v1",
apiKey: process.env.COROUTER_API_KEY,
});
const response = await client.chat.completions.create({
model: "qwen4-max",
max_tokens: 1024,
messages: [
{ role: "user", content: "Refactor this API handler for streaming responses." },
],
});
console.log(response.choices[0].message.content);import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://amr-link.open-design.ai",
apiKey: process.env.COROUTER_API_KEY,
});
const message = await client.messages.create({
model: "qwen4-max",
max_tokens: 1024,
messages: [
{ role: "user", content: "Refactor this API handler for streaming responses." },
],
});
console.log(message.content);Inspect response payload & HTTP errors
{
"id": "chatcmpl_od_01j9x7k2m8",
"object": "chat.completion",
"model": "qwen4-max",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Here is the streaming handler implementation..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 50000,
"completion_tokens": 4000,
"total_tokens": 54000,
"prompt_tokens_details": {
"cached_tokens": 40000
}
}
}
HTTP 401 Unauthorized Invalid or missing Bearer COROUTER_API_KEY.
HTTP 403 Forbidden Workspace key lacks permission for this model or endpoint.
HTTP 404 Not Found Unknown model ID or unavailable endpoint path.
HTTP 429 Too Many Requests Workspace rate limit, concurrency cap, or credit limit reached.
HTTP 502 Bad Gateway Upstream provider returned an error after automatic failover.
HTTP 503 Service Unavailable Upstream provider temporarily unavailable; retry with backoff.
Coding Agents
Pre-filled configurations for Qwen4 Max across supported coding tools.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"corouter": {
"npm": "@ai-sdk/openai-compatible",
"name": "OpenDesign Go",
"options": {
"baseURL": "https://amr-link.open-design.ai/v1",
"apiKey": "{env:COROUTER_API_KEY}"
},
"models": {
"qwen4-max": {
"name": "Qwen4 Max"
}
}
}
},
"model": "corouter/qwen4-max"
}model_provider = "corouter"
model = "qwen4-max"
[model_providers.corouter]
name = "OpenDesign Go"
base_url = "https://amr-link.open-design.ai/v1"
env_key = "COROUTER_API_KEY"
wire_api = "responses"export ANTHROPIC_BASE_URL="https://amr-link.open-design.ai"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_API_KEY=""
export ANTHROPIC_MODEL="qwen4-max"
claudehermes model
# Select: custom OpenAI-compatible endpoint
# Base URL: https://amr-link.open-design.ai/v1
# API key: YOUR_API_KEY
# Model: qwen4-maxbrew install --cask cc-switch
# Add OpenDesign Go API Key
# Base URL: https://amr-link.open-design.ai/v1
# Model ID: qwen4-maxCompare Models
Side-by-side pricing, context window, and 50K-token coding turn estimate.
Frequently Asked Questions
Qwen4 Max (qwen4-max) is billed at official list rates: $1.5/1M input and $4.5/1M output, with prompt cache reads at $0.075/1M (-95%).
Qwen4 Max supports Text + Image + Video → Text with a 1M context window and up to 131,072 output tokens.
Yes. Qwen4 Max supports reasoning_effort levels (none / low / medium / high) with a default of medium.
Cached prompt reads on Qwen4 Max are billed at $0.075/1M tokens (-95% vs standard input), with cache writes at $1.875/1M.
Yes. Copy the pre-filled configuration in the Coding Agents section above, set model to "qwen4-max", and replace YOUR_API_KEY with your OpenDesign Go key.
No. OpenDesign Go enforces Zero Data Retention and records only account, model, token counts, and usage cost — never prompt or response bodies.
More models from Alibaba
View provider pageExplore more models
Full directoryQwen4 Max API
https://amr-link.open-design.ai/v1
curl https://amr-link.open-design.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $COROUTER_API_KEY" \
-d '{
"model": "qwen4-max",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Refactor this API handler for streaming responses." }
]
}'import os
from openai import OpenAI
client = OpenAI(
base_url="https://amr-link.open-design.ai/v1",
api_key=os.environ["COROUTER_API_KEY"],
)
response = client.chat.completions.create(
model="qwen4-max",
max_tokens=1024,
messages=[
{"role": "user", "content": "Refactor this API handler for streaming responses."}
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://amr-link.open-design.ai/v1",
apiKey: process.env.COROUTER_API_KEY,
});
const response = await client.chat.completions.create({
model: "qwen4-max",
max_tokens: 1024,
messages: [
{ role: "user", content: "Refactor this API handler for streaming responses." },
],
});
console.log(response.choices[0].message.content);import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://amr-link.open-design.ai",
apiKey: process.env.COROUTER_API_KEY,
});
const message = await client.messages.create({
model: "qwen4-max",
max_tokens: 1024,
messages: [
{ role: "user", content: "Refactor this API handler for streaming responses." },
],
});
console.log(message.content);