Qwen Image 2.1 Pro
Qwen Image 2.1 Pro is an image generation and editing model from Qwen, the higher-quality tier of the Qwen Image 2.1 series.
Pricing
- Image output
- $11.57per 1M image tokens
- Max output
- 58,982tokens
OpenRouter's price plus OpenRouter's 5% platform fee. Deference adds no markup.
Terminal
curl https://deference.si/v1/chat/completions \
-H "Authorization: Bearer $DEFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen-image-2.1-pro",
"modalities": ["image", "text"],
"messages": [{ "role": "user", "content": "Say hello in one sentence." }]
}'import os
from openai import OpenAI
client = OpenAI(base_url="https://deference.si/v1", api_key=os.environ["DEFERENCE_API_KEY"])
completion = client.chat.completions.create(
model="qwen/qwen-image-2.1-pro",
extra_body={"modalities": ["image", "text"]},
messages=[{"role": "user", "content": "Say hello in one sentence."}],
)
print(completion.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://deference.si/v1", apiKey: process.env.DEFERENCE_API_KEY });
const completion = await client.chat.completions.create({
model: "qwen/qwen-image-2.1-pro",
...{ modalities: ["image", "text"] },
messages: [{ role: "user", content: "Say hello in one sentence." }],
});
console.log(completion.choices[0].message.content);