Qwen4 Max API
Use Qwen4 Max by Qwen through Refract's OpenAI-compatible API for $0.48 per 1M input and $1.44 per 1M output tokens. Pay per token, no subscription.
| Model ID | qwen4-max |
|---|---|
| Provider | Qwen |
| Input, per 1M tokens | $0.48 |
| Output, per 1M tokens | $1.44 |
| Context window | 1,000,000 tokens |
Qwen4 Max for coding, multimodal understanding and long-context reasoning.
About this model
Qwen4 Max is the newest Qwen Max model on Refract, and the highest-priced of the 2 Qwen models here. It replaces Qwen 3.8 Max as the latest Qwen Max model. It reads up to 1M tokens of context and writes up to 131K tokens per reply. Repeated prompt prefixes are read from cache at $0.024 per 1M tokens, 95% less than fresh input, which is what makes long agent sessions cheap.
How it compares
- Qwen 3.8 Max: Qwen 3.8 Max costs 25% less; Qwen4 Max is the newer release; max reply 131K vs 131K; cached input $0.024 vs $0.045.
What a request costs
A typical chat message (2,000 tokens in, 400 out) costs about $0.0015. A coding-agent step (60,000 tokens in, 54,000 of them from cache, 800 out) costs about $0.0053.
Chat with Qwen4 Max · Get an API key
Use it from code
curl https://refracthub.com/v1/chat/completions \
-H "Authorization: Bearer $REFRACT_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "qwen4-max", "messages": [{"role": "user", "content": "Hello"}]}'from openai import OpenAI
client = OpenAI(base_url="https://refracthub.com/v1", api_key="YOUR_REFRACT_KEY")
reply = client.chat.completions.create(model="qwen4-max", messages=[{"role": "user", "content": "Hello"}])
print(reply.choices[0].message.content)
Questions
How much does Qwen4 Max cost on Refract?
$0.48 per 1M input tokens and $1.44 per 1M output tokens. You pay only for the tokens you use, with no subscription.
Qwen4 Max or Qwen 3.8 Max: which should I use?
Qwen 3.8 Max is cheaper. Qwen4 Max is the newer release. Both work with the same key and the same API, so you can try one and switch by changing the model name from "qwen4-max" to "qwen3.8-max".
Does it work with the OpenAI SDK?
Yes. Point the OpenAI SDK, or any OpenAI-compatible app, at https://refracthub.com/v1 with your Refract key and use the model name "qwen4-max". The Anthropic Messages format works too.
Can I use Qwen4 Max without writing code?
Yes. Chat with it on the web at https://refracthub.com/chat, or use the Refract desktop app for Windows.
Other Qwen models
- Qwen 3.8 Max: $0.36 / $1.08 per 1M tokens