
Image generation and editing with Pro and Turbo variants, up to ten reference images, transparent PNG output, and custom sizes up to 2560x2560.
Image generation and editing with Pro and Turbo variants, up to ten reference images, transparent PNG output, and custom sizes up to 2560x2560.
Also known as Qwen Image, Alibaba Cloud Qwen Image 2.1
qwen-image-2-1/v1/images/generationsqwen-image-2.1qwen-image-2.1-proqwen-image-2.1-turboalibaba/qwen-image-2-1alibaba/qwen-image-2.1Live pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.
Qwen Image 2.1 runs through POST /v1/images/generations. The request returns a job_id right away; poll GET /v1/jobs/{job_id} until the job completes and read the output URLs from the result. Or add "sync": true to skip polling: the request stays open and returns the finished OpenAI-style image response directly, so OpenAI SDKs work as-is. Get an API key from the EmpirioLabs dashboard.
curl https://api.empiriolabs.ai/v1/images/generations \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-2-1",
"prompt": "Describe what you want Qwen Image 2.1 to generate."
}'curl https://api.empiriolabs.ai/v1/jobs/JOB_ID \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY"import requests
response = requests.post(
"https://api.empiriolabs.ai/v1/images/generations",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
json={
"model": "qwen-image-2-1",
"prompt": "Describe what you want Qwen Image 2.1 to generate.",
},
)
job = response.json()
# Generation runs as an async job. Poll until it completes.
import time
while True:
status = requests.get(
f"https://api.empiriolabs.ai/v1/jobs/{job['job_id']}",
headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
).json()
if status.get("status") in ("completed", "failed"):
print(status)
break
time.sleep(5)Request parameters supported by the Qwen Image 2.1 API on EmpirioLabs. Defaults apply when a field is omitted.
| Parameter | Type | Default | Range / values | Description |
|---|---|---|---|---|
| prompt | string | - | - | Describe the image to create. With input images attached, this becomes the editing instruction. An image-only edit uses a neutral preservation prompt. |
| model_variant | enum | qwen-image-2.1-pro | qwen-image-2.1-pro, qwen-image-2.1-turbo | Choose Pro for the highest image quality and complex edits, or Turbo for faster, lower-cost generation. When this is not set, the model id "qwen-image-2.1-turbo"... |
| image | array | - | - | One to ten reference images as URLs, data URIs, or uploaded image objects. |
| images | array | - | - | Plural alias for multiple uploaded image references. |
| aspect_ratio | enum | auto | auto, 1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5 | Optional output aspect ratio. Auto is the default. With a fixed 1K or 2K resolution, Auto uses that tier's square size. With Resolution set to Auto, the model... |
| resolution | enum | 2K | auto, 1K, 2K | Output size preset. Defaults to 2K. Auto lets the model choose the size when Aspect Ratio is Auto; with a selected aspect ratio, Auto uses the 1K preset. |
| size | string | - | - | Exact output size as WIDTH*HEIGHT, for example 2048*1536. This overrides aspect_ratio and resolution. |
| use_custom_size | boolean | false | - | Use custom_width and custom_height instead of the aspect-ratio and resolution presets. |
| custom_width | number | - | 256 to 4096 | Custom output width in pixels. Total area must be between 512x512 and 2560x2560, with an aspect ratio from 1:8 to 8:1. |
| custom_height | number | - | 256 to 4096 | Custom output height in pixels. Total area must be between 512x512 and 2560x2560, with an aspect ratio from 1:8 to 8:1. |
| num_images | number | 1 | 1 to 6 | Number of output images. Each output is billed separately. |
| negative_prompt | string | - | - | Describe visual elements or qualities to avoid in the output. |
| prompt_extend | boolean | true | - | Expand the prompt automatically for stronger composition and detail. Turn it off when you ask for a transparent background. |
| prompt_extend_mode | enum | direct | direct, agent | Direct works for generation and editing. Agent performs deeper prompt refinement and is available for text-to-image requests only. |
Qwen Image 2.1 combines Pro and Turbo image generation and editing in one model. Pro is selected by default, output starts at 2K, and aspect ratio starts in Auto. Turbo provides a faster, lower-cost option.
Generated images pass an automated content-safety check. An image flagged as explicit is not returned. Because the image is generated before the check runs, a flagged generation is still billed.
On EmpirioLabs, Qwen Image 2.1 is billed pay as you go: Pro $0.040 per image; Turbo $0.016 per image. The live rate card on this page always matches what the API charges.
Qwen Image 2.1 is served through POST /v1/images/generations on api.empiriolabs.ai with standard bearer-token authentication.
Yes. The EmpirioLabs playground runs Qwen Image 2.1 in the browser with the same parameters the API exposes, so you can test prompts before writing code.
Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.
Check out our pricing or reach out if you want your own model deployed on our stack.