> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# 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.

![Qwen Image 2.1](https://media.empiriolabs.ai/model-logos/qwen.png)

[Alibaba Cloud](/providers/alibaba) · 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

| Field               | Value                                                                                                              |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Model id            | `qwen-image-2-1`                                                                                                   |
| Model release date  | 2026-10-02                                                                                                         |
| Input modalities    | Text, Image                                                                                                        |
| Output modalities   | Image                                                                                                              |
| Context window      | -                                                                                                                  |
| Weight precision    | -                                                                                                                  |
| Region              | Singapore                                                                                                          |
| Features            | image_generation, image_editing, multi_image, multi_reference, transparent_background, text_rendering              |
| Native inference    | No                                                                                                                 |
| New                 | Yes                                                                                                                |
| Supported endpoints | `POST /v1/images/generations`                                                                                      |
| Alternate model ids | `qwen-image-2.1`, `qwen-image-2.1-pro`, `qwen-image-2.1-turbo`, `alibaba/qwen-image-2-1`, `alibaba/qwen-image-2.1` |

## Pricing

| Charge | Spec      | Rate    |
| ------ | --------- | ------- |
| Pro    | per image | \$0.040 |
| Turbo  | per image | \$0.016 |

## Example request

```bash
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

| Parameter            | Type    | Required | Default                | Description                                                                                                                                                                                                                                                                         |
| -------------------- | ------- | -------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `prompt`             | string  | no       | -                      | 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    | no       | `"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`                                                                                                                     |
| `image`              | array   | no       | -                      | One to ten reference images as URLs, data URIs, or uploaded image objects.                                                                                                                                                                                                          |
| `images`             | array   | no       | -                      | Plural alias for multiple uploaded image references.                                                                                                                                                                                                                                |
| `aspect_ratio`       | enum    | no       | `"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` |
| `resolution`         | enum    | no       | `"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`                                                                                             |
| `size`               | string  | no       | -                      | Exact output size as WIDTH*HEIGHT, for example 2048*1536. This overrides aspect_ratio and resolution.                                                                                                                                                                               |
| `use_custom_size`    | boolean | no       | false                  | Use custom_width and custom_height instead of the aspect-ratio and resolution presets.                                                                                                                                                                                              |
| `custom_width`       | number  | no       | -                      | 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_height`      | number  | no       | -                      | 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_images`         | number  | no       | `1`                    | Number of output images. Each output is billed separately. · Range: 1 – 6                                                                                                                                                                                                           |
| `negative_prompt`    | string  | no       | `""`                   | Describe visual elements or qualities to avoid in the output.                                                                                                                                                                                                                       |
| `prompt_extend`      | boolean | no       | true                   | Expand the prompt automatically for stronger composition and detail. Turn it off when you ask for a transparent background.                                                                                                                                                         |
| `prompt_extend_mode` | enum    | no       | `"direct"`             | Direct works for generation and editing. Agent performs deeper prompt refinement and is available for text-to-image requests only. · Allowed: `direct`, `agent`                                                                                                                     |
| `seed`               | number  | no       | -                      | Reproducibility seed. Leave empty for a random result. · Range: 0 – 2147483647                                                                                                                                                                                                      |
| `watermark`          | boolean | no       | false                  | Add the Qwen provenance watermark to the generated image. EmpirioLabs does not add a watermark of its own.                                                                                                                                                                          |
| `response_format`    | enum    | no       | `"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`.