Qwen-Image 2.1 API for Generation, Editing and Transparent PNGs

Qwen-Image 2.1 is Alibaba's open-weight image model, exposed on one endpoint for four jobs: text to image, editing with up to 10 reference images, transparent PNG output and single-image background removal. POST to /api/v1/images/generations with model: qwen-image-2-1; leave out image_list to generate, include it to edit. Every job returns a single PNG at a flat price per resolution tier.
Get API Key
Photographer's light table with several reference prints merging into one finished photo

Four Image Jobs, One Request Shape

Multi-reference editing by image number

List up to 10 images in image_list at 1K, or up to 3 at 2K. Refer to them in the prompt as <image1>, <image2> and so on, in array order; image1 is the image being edited and the rest are references.
A room interior photo with fabric and lamp swatches laid beside it on a table

Transparent output and cut-outs

Set background: transparent for a PNG with an alpha channel, for both generation and editing. Send one image with background: transparent and no prompt to remove its background. Composite onto your own backdrop before converting to JPEG.
A ceramic teapot standing alone on a light checkerboard surface

Text rendered as written

Prompts of up to 4,000 characters are accepted in any language, and text you ask for inside the image is rendered as written, which helps with posters, signs and packaging mock-ups.
Blank paper shop sign and poster frames hanging in a quiet street
Only model is always required; prompt is required except for background removal.

Qwen-Image 2.1 Request Fields and Limits

model

Always qwen-image-2-1.

prompt

Up to 4,000 characters; the generation brief or edit instruction. Reference images as <image1> … <image10>. Can be omitted only for background removal.

image_list

Optional, [{"url": "https://…"}]. Up to 10 images at 1K, up to 3 at 2K. The first image is the one edited. PNG references are read with their alpha channel.

ratio

auto (default), 1:1, 2:3, 3:2, 3:4, 4:3, 9:16, 16:9, 21:9. auto follows image1 when editing and means 1:1 for text to image.

image_size

1K (default, about 1 megapixel) or 2K (about 4 megapixels, native). Case-insensitive; also the price tier.

background, seed, custom_callback_url

background: opaque (default) or transparent. seed: 0 to 2147483647 for more reproducible results. custom_callback_url: optional HTTPS URL for status callbacks.
Flat per image by resolution tier; mode, transparency and reference count do not matter.

Qwen-Image 2.1 API Pricing

1K: 1 token ($0.02) per image

About 1 megapixel. This is the default image_size.

2K: 4 tokens ($0.08) per image

About 4 megapixels, the model's native resolution.

References add nothing

An edit with 10 reference images at 1K costs the same 1 token ($0.02) as a plain text-to-image request.

Same price for every mode

Text to image, editing, transparent output and background removal are all billed at the tier price; failed jobs are refunded automatically.

Integrate the Qwen-Image 2.1 API

1

1. Create an API key

Generate a key at /keys and send it as Authorization: Bearer <key>.
2

2. Pick the mode

Prompt only for text to image; add image_list to edit; add background: transparent for alpha; one image plus transparent and no prompt removes the background.
3

3. Submit

POST {"model": "qwen-image-2-1", "prompt": "…", "image_size": "1K"} to /api/v1/images/generations and store img_uuid.
4

4. Download the PNG

Poll GET /api/v1/jobs/detail or use your callback, and save the PNG from json[0].value within 24 hours.
Create an API Key
Workflows that mix generation, editing and alpha output.

What Developers Build with Qwen-Image 2.1

Product composites

Place a product photo into a new scene using reference images for props and setting.

Sticker and asset packs

Generate transparent PNG characters, icons and objects for apps, games and design tools.

Localized posters and packaging

Render headlines and labels in the target language directly inside the generated image.

Image editors

Offer instruction-based edits and background removal from one integration.
Endpoint, modes, limits and pricing.

Qwen-Image 2.1 API FAQ

What is the Qwen-Image 2.1 API endpoint?

POST https://api.goenhance.ai/api/v1/images/generations with model: qwen-image-2-1.

How much does an image cost?

1 token ($0.02) at 1K and 4 tokens ($0.08) at 2K, for any mode and any number of reference images.

Why can I only send 3 references at 2K?

At 2K every reference is also encoded at 2K, so the limit drops from 10 to 3.

How do I remove a background?

Send one image in image_list with background: transparent and no prompt. The result is a PNG with an alpha channel.

Why does my transparent PNG show a colored background as JPEG?

Fully transparent pixels carry an arbitrary color underneath. Composite the PNG over your own background before converting it. Glass and lenses come out opaque.

How long does a job take?

The docs give about 30 to 60 seconds of processing at 1K and about 3 to 7 minutes at 2K, plus queue time. Use polling or custom_callback_url.

Start Building with the Qwen-Image 2.1 API

Qwen-Image 2.1 API: Pricing & Integration | GoEnhance