model apis · chat / llm

Qwen4 Max API●

Run Qwen4 Max by Qwen through one OpenAI-compatible endpoint. Pay per use against your GPU.ai balance. No instance to rent, no deployment to manage.

Available now

Qwen4 Max API pricing

Live catalog rates, billed per use against your GPU.ai balance. No subscriptions, no minimums.

TierRate
Serverless
Input tokens: $1.57 / 1MCached input tokens: $0.078 / 1MOutput tokens: $4.70 / 1M

rates are read every few minutes from the live model catalog and metered per request

Call Qwen4 Max in one request

Any OpenAI SDK works: set the base URL to https://api.gpu.ai/v1 and use your GPU.ai API key.

curl
curl https://api.gpu.ai/v1/chat/completions \
  -H "Authorization: Bearer $GPUAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpuai/qwen4-max",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://api.gpu.ai/v1",
    api_key="YOUR_GPUAI_API_KEY",
)

response = client.chat.completions.create(
    model="gpuai/qwen4-max",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
JavaScript (OpenAI SDK)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.gpu.ai/v1",
  apiKey: process.env.GPUAI_API_KEY,
});

const response = await client.chat.completions.create({
  model: "gpuai/qwen4-max",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);

Qwen4 Max on GPU.ai

Model idgpuai/qwen4-max
ModalityChat / LLM
AuthorQwen
Context window1,000,000 tokens
Streaming—
Tool callingSupported
Structured outputsSupported (json_object, json_schema)
Aliases—

faq

Qwen4 Max API questions●

How much does the Qwen4 Max API cost?

Qwen4 Max on GPU.ai currently costs $1.57 / 1M (input tokens), $0.078 / 1M (cached input tokens), $4.70 / 1M (output tokens). There are no subscriptions or minimums. Usage is billed against your GPU.ai balance as you go.

Is the Qwen4 Max API OpenAI-compatible?

Yes. Point any OpenAI SDK at https://api.gpu.ai/v1 with a GPU.ai API key and request model "gpuai/qwen4-max". No proprietary client needed.

What is the context window of Qwen4 Max?

Qwen4 Max supports a 1,000,000-token context window on GPU.ai.

Does Qwen4 Max support tool calling and structured outputs?

Yes, tool calling works: pass tools and tool_choice exactly as with the OpenAI API, and tool calls come back in message.tool_calls (and as delta.tool_calls when streaming). Structured outputs work too: response_format accepts {"type":"json_object"} and {"type":"json_schema", ...}.

How does billing work?

Chat models bill per input and output token at the listed per-million-token rates, metered per request against your GPU.ai balance. Where a cached-input rate is listed, the part of a prompt the serving partner answers from its prompt cache (reported as prompt_tokens_details.cached_tokens) bills at that lower rate instead of the input rate.