Skip to navigation

Qwen Image 2.1

Qwen Image 2.1
Alibaba Cloud · Image Generation
POST /v1/images/generations

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

At a glance

FieldValue
Model idqwen-image-2-1
Model release date2026-10-02
Input modalitiesText, Image
Output modalitiesImage
Context window-
Weight precision-
RegionSingapore
Featuresimage_generation, image_editing, multi_image, multi_reference, transparent_background, text_rendering
Native inferenceNo
NewYes
Supported endpointsPOST /v1/images/generations
Alternate model idsqwen-image-2.1, qwen-image-2.1-pro, qwen-image-2.1-turbo, alibaba/qwen-image-2-1, alibaba/qwen-image-2.1

Pricing

ChargeSpecRate
Proper image$0.040
Turboper image$0.016

Example request

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": "a misty forest at dawn", "size": "1024x1024"}'

Parameters

ParameterTypeRequiredDefaultDescription
promptstringno-Describe the image to create. With input images attached, this becomes the editing instruction. An image-only edit uses a neutral preservation prompt.
model_variantenumno"qwen-image-2.1-pro"Choose Pro for the highest image quality and complex edits, or Turbo for faster, lower-cost generation. · Allowed: qwen-image-2.1-pro, qwen-image-2.1-turbo
imagearrayno-One to ten reference images as URLs, data URIs, or uploaded image objects.
imagesarrayno-Plural alias for multiple uploaded image references.
aspect_ratioenumno"auto"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 chooses the complete output size. · Allowed: auto, 1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5
resolutionenumno"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. · Allowed: auto, 1K, 2K
sizestringno-Exact output size as WIDTHHEIGHT, for example 20481536. This overrides aspect_ratio and resolution.
use_custom_sizebooleannofalseUse custom_width and custom_height instead of the aspect-ratio and resolution presets.
custom_widthnumberno-Custom output width in pixels. Total area must be between 512x512 and 2560x2560, with an aspect ratio from 1:8 to 8:1. · Range: 256 – 4096
custom_heightnumberno-Custom output height in pixels. Total area must be between 512x512 and 2560x2560, with an aspect ratio from 1:8 to 8:1. · Range: 256 – 4096
num_imagesnumberno1Number of output images. Each output is billed separately. · Range: 1 – 6
negative_promptstringno""Describe visual elements or qualities to avoid in the output.
prompt_extendbooleannotrueExpand the prompt automatically for stronger composition and detail. Turn it off when you ask for a transparent background.
prompt_extend_modeenumno"direct"Direct works for generation and editing. Agent performs deeper prompt refinement and is available for text-to-image requests only. · Allowed: direct, agent
seednumberno-Reproducibility seed. Leave empty for a random result. · Range: 0 – 2147483647
watermarkbooleannofalseAdd the Qwen provenance watermark to the generated image. EmpirioLabs does not add a watermark of its own.
response_formatenumno"url"Return signed image URLs by default, or include base64 image data when b64_json is requested. · Allowed: url, b64_json

Notes

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.

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.


Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/qwen-image-2-1.