Qwen-Image 2.1 (evaluation) qwen-image-2.1
Evaluation only (Qwen Research License): text to image and editing with up to 10 reference images and a mask, native transparent output, 2048x2048 by default.
Inputs
| Input | Accepts |
|---|---|
text | |
image | formats png, jpeg, webp references type: integer, min: 1, max: 10 |
Parameters
Streams with stream: true.
| Parameter | Type | Values | Default |
|---|---|---|---|
size | any | ||
aspect_ratio | string | 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16 | 1:1 |
resolution | string | 768, 1K, 1.5K, 2K | |
n | integer | 1–4 | 1 |
response_format | string | url, b64_json | url |
seed | integer | ||
steps | integer | 6, 20–50 | 6 |
output_format | string | png, jpeg, webp | png |
background | string | auto, opaque, transparent | auto |
output_compression | integer | 0–100 |
Endpoints
POST
/v1/images/generations
Create Image
POST/v1/images
Generate Image (OpenRouter)
POST/v1/images/edits
Edit Image
A request
curl https://api.vultrinference.com/v1/images/generations \
-H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-2.1",
"prompt": "Studio photograph of a red ceramic teapot beside a blue cup on a wooden table.",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}'import os
import requests
response = requests.post(
"https://api.vultrinference.com/v1/images/generations",
headers={"Authorization": f"Bearer {os.environ['VULTR_INFERENCE_API_KEY']}"},
json={
"model": "qwen-image-2.1",
"prompt": "Studio photograph of a red ceramic teapot beside a blue cup on a wooden table.",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json",
},
)
print(response.json())const response = await fetch("https://api.vultrinference.com/v1/images/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VULTR_INFERENCE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "qwen-image-2.1",
"prompt": "Studio photograph of a red ceramic teapot beside a blue cup on a wooden table.",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}),
});
console.log(await response.json());