Qwen Image 2.1 API

Image generation and editing with Pro and Turbo variants, up to ten reference images, transparent PNG output, and custom sizes up to 2560x2560.

Alibaba CloudImage GenerationReleased Oct 2, 2026SingaporeProprietary EndpointNew

About Qwen Image 2.1

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

image generationimage editingmulti imagemulti referencetransparent backgroundtext rendering

Qwen Image 2.1 specs

Model ID
qwen-image-2-1
Author
Alibaba Cloud
Category
Image Generation
Released
Oct 2, 2026
Input
TextImage
Output
Image
Region
Singapore
Endpoints
POST/v1/images/generations
Alternate model IDs
qwen-image-2.1qwen-image-2.1-proqwen-image-2.1-turboalibaba/qwen-image-2-1alibaba/qwen-image-2.1

Qwen Image 2.1 API pricing

Live pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.

Type
Spec
Rate
Pro
per image
$0.040
Turbo
per image
$0.016
Compare on the full pricing page

How to call the Qwen Image 2.1 API

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: submit the job
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: poll for the result
curl https://api.empiriolabs.ai/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY"
Python
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)
Full Qwen Image 2.1 API reference

Qwen Image 2.1 API parameters

Request parameters supported by the Qwen Image 2.1 API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
promptstring--Describe the image to create. With input images attached, this becomes the editing instruction. An image-only edit uses a neutral preservation prompt.
model_variantenumqwen-image-2.1-proqwen-image-2.1-pro, qwen-image-2.1-turboChoose 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"...
imagearray--One to ten reference images as URLs, data URIs, or uploaded image objects.
imagesarray--Plural alias for multiple uploaded image references.
aspect_ratioenumautoauto, 1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5Optional 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...
resolutionenum2Kauto, 1K, 2KOutput 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.
sizestring--Exact output size as WIDTH*HEIGHT, for example 2048*1536. This overrides aspect_ratio and resolution.
use_custom_sizebooleanfalse-Use custom_width and custom_height instead of the aspect-ratio and resolution presets.
custom_widthnumber-256 to 4096Custom output width in pixels. Total area must be between 512x512 and 2560x2560, with an aspect ratio from 1:8 to 8:1.
custom_heightnumber-256 to 4096Custom output height in pixels. Total area must be between 512x512 and 2560x2560, with an aspect ratio from 1:8 to 8:1.
num_imagesnumber11 to 6Number of output images. Each output is billed separately.
negative_promptstring--Describe visual elements or qualities to avoid in the output.
prompt_extendbooleantrue-Expand the prompt automatically for stronger composition and detail. Turn it off when you ask for a transparent background.
prompt_extend_modeenumdirectdirect, agentDirect works for generation and editing. Agent performs deeper prompt refinement and is available for text-to-image requests only.
3 more parameters in the docs

Good to know

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.

Variants

  • Choose qwen-image-2.1-pro for the highest image quality and complex edits.
  • Choose qwen-image-2.1-turbo for faster, lower-cost generation and routine edits.
  • Choose with model_variant. Without it, the model id qwen-image-2.1-turbo runs Turbo and every other id of this model runs Pro.

Modes

  • Text to image from a prompt.
  • Image editing and reference-guided generation from one to ten images.
  • Direct prompt extension works for generation and editing. Agent prompt extension provides deeper refinement for text-to-image requests only.

Transparent images

  • Output images are PNG files. For a transparent background, set prompt_extend to false and describe the image in this form: "This is an RGBA image with transparency. A glass perfume bottle. The image has alpha channel and the background is transparent."

Output limits

  • One to six output images per request.
  • 1K, 2K, automatic, aspect-ratio presets, or an exact custom size.
  • Exact and custom sizes stay between 512x512 and 2560x2560 pixels in total area, with an aspect ratio from 1:8 to 8:1.

Billing

  • Each output image is billed at its variant's rate. Reference images are not billed.

Content safety

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.

Qwen Image 2.1 API: common questions

How much does the Qwen Image 2.1 API cost?

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.

Which endpoint does Qwen Image 2.1 use?

Qwen Image 2.1 is served through POST /v1/images/generations on api.empiriolabs.ai with standard bearer-token authentication.

Can I try Qwen Image 2.1 in the browser before integrating?

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.

How do I get a Qwen Image 2.1 API key?

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.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.