Qwen4-Max on DeepInfra

Qwen4 · Alibaba

Serverless

Last refreshed 2026-11-16. Next refresh: weekly.

Why use Qwen4-Max on DeepInfra?

DeepInfra offers Qwen4-Max with pay-as-you-go pricing at $1.41/1M input tokens. DeepInfra is a cloud inference platform offering cost-effective access to open-source AI models.

Compare Qwen4-Max across 6 providers to find the best fit for your use case
Input / 1M
$1.41
Output / 1M
$4.24
Cache
read $0.071
Batch
Not sourced

Setup recipe

Python + curl
Install
pip install openai
Auth
export DEEPINFRA_API_KEY=...
Call
import os
from openai import OpenAI
client = OpenAI(
    api_key=os.environ["DEEPINFRA_API_KEY"],
Model ID
Qwen/Qwen4-Max

Request example

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DEEPINFRA_API_KEY"],
    base_url="https://api.deepinfra.com/v1/openai"
)
response = client.chat.completions.create(
    model="Qwen/Qwen4-Max",
    messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)

Gotchas

  • Use provider model ID "Qwen/Qwen4-Max", not the LLMReference slug "qwen4-max".
  • DeepInfra uses "organization/model-name" format, e.g. "meta-llama/Meta-Llama-3-8B-Instruct" or "mistralai/Mistral-7B-Instruct-v0.3". See the DeepInfra model catalog for exact IDs.
  • The examples expect DEEPINFRA_API_KEY; rename it only if your application config maps the new variable.

Compare Qwen4-Max Across Providers

ProviderInput (per 1M)Output (per 1M)
Alibaba Cloud PAI-EAS$1.50$4.50
OpenRouter$1.50$4.50
Vercel AI Gateway$1.50$4.50
DeepInfra$1.41$4.24
Novita AI$1.41$4.24
View all 6 providers →

Pricing

TypePrice (per 1M)
Input tokens$1.41
Output tokens$4.24

Capabilities

VisionMultimodalReasoningJSON / Tool useStructured OutputsPrompt CachingVideo

About Qwen4-Max

Qwen4-Max is the first production model in Alibaba's Qwen4 series and the general-availability successor to Qwen4-Max-Preview, with pay-as-you-go API access on Alibaba Cloud Model Studio. The Qwen team describes a new sparse MoE architecture with a 2.4-trillion-parameter backbone, 71B parameters activated per token and an additional 328B N-gram embedding parameters, with native vision. It takes text, image and video input and returns text, with a 1,000,000-token context window, deep thinking at low, high and xhigh effort, parallel tool calling, web search, structured output, and explicit and implicit caching, over OpenAI- and Anthropic-compatible APIs.

Get Started