Skip to main content

Qwen Image 2.1 Pro - Image Text Editor

Premium image editing model by Alibaba Cloud. Qwen Image 2.1 Pro edits a source image from natural-language instructions and supports up to ten reference images (one primary plus nine additional) for complex multi-image fusion. Outputs are returned as PNG with prompt-driven transparency.

Endpoint​

Request Headers​

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Parameters​

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be IMAGE_EDITOR
modelstringYesAI model identifier. Must be qwen-image-2.1-pro
promptObjectobjectYesConfiguration object containing all image editing parameters

Prompt Object Parameters​

ParameterTypeRequiredDescriptionDefault
imageUrlstringYesS3 object key of the primary source image to edit (max 10MB; PNG/JPEG/WebP)-
promptstringYesText description of the desired edit-
additional_imagesarrayNoUp to 9 additional reference S3 object keys (ten images in total; max 10MB each)[]
widthnumberYesOutput width in pixels; total pixels (width × height) must be between 512×512 (262,144) and 2048×2048 (4,194,304)-
heightnumberYesOutput height in pixels; total pixels (width × height) must be between 512×512 (262,144) and 2048×2048 (4,194,304)-
nnumberNoNumber of output images to generate (1–6)1
prompt_extendbooleanNoEnable AI prompt optimization for better resultstrue
enable_thinkingbooleanNoLet the model reason while optimizing the prompt. Requires prompt_extend to be enabledprompt_extend
seednumberNoRandom seed for reproducible results (0–2147483647)-
Editing differences from generation

prompt_extend_mode: "agent" is generation-only and is rejected when editing. negative_prompt is not supported by Qwen Image 2.1 (a non-empty value is rejected).

Image Inputs (S3 Object Keys)​

imageUrl and every entry in additional_images are S3 object keys returned by the asset upload flow (e.g. development/images/2026_01_12_17_06_40_810_283595.png), not raw files or data URIs. Each reference must be a PNG, JPEG, or WebP of at most 10MB, with dimensions between 1 and 8000px per side and an aspect ratio no wider than 10:1.

Multi-Image Editing​

Qwen Image 2.1 supports up to ten total images — one primary (imageUrl) plus up to nine in additional_images. In your prompt, reference them as "Image 1" (primary), "Image 2", "Image 3", … to control how each is used.

Example: "Replace the background in Image 1 with the landscape from Image 2."

Output & Transparency​

Every output is returned as a PNG. Transparency is prompt-driven — ask for a transparent background in the prompt and the alpha channel is preserved.

Code Examples​

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_EDITOR",
"model": "qwen-image-2.1-pro",
"promptObject": {
"imageUrl": "development/images/2026_01_12_18_10_29_882_portrait.png",
"prompt": "Replace the background in Image 1 with a serene mountain landscape at sunset",
"additional_images": [],
"width": 1024,
"height": 1024,
"n": 1,
"prompt_extend": true
}
}'

Interactive Playground​

API Playground

https://api.1min.ai/api/features
S3 object key of the image to edit
Describe the edit. Reference images as Image 1, Image 2, …
Pixels. Total pixels (width × height) must be between 512*512 and 2048*2048
Pixels. Total pixels (width × height) must be between 512*512 and 2048*2048
How many images to generate (1-6)
AI will enhance your prompt for better results
Reason while optimizing the prompt (requires Prompt Optimization)
Random seed for reproducible results (0-2147483647)

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_EDITOR",
"model": "qwen-image-2.1-pro",
"promptObject": {
"imageUrl": "development/images/2026_01_12_18_10_29_882_portrait.png",
"prompt": "Replace the background in Image 1 with a serene mountain landscape at sunset",
"additional_images": [],
"width": 1024,
"height": 1024,
"n": 1,
"prompt_extend": true,
"enable_thinking": true
}
}'

Response Format​

{
"aiRecord": {
"uuid": "b237afb5-5826-49bd-ab4d-6f00e96545e1",
"model": "qwen-image-2.1-pro",
"type": "IMAGE_EDITOR",
"status": "SUCCESS",
"aiRecordDetail": {
"promptObject": {
"imageUrl": "development/images/2026_01_12_18_10_29_882_portrait.png",
"prompt": "Replace the background in Image 1 with a serene mountain landscape at sunset",
"additional_images": [],
"width": 1024,
"height": 1024,
"n": 1,
"prompt_extend": true,
"enable_thinking": true
},
"resultObject": [
"development/images/2026_01_12_18_11_02_110_edited.png"
],
"responseObject": {
"request_id": "a1b2c3d4-0000-0000-0000-abcdef123456",
"usage": { "image_count": 1, "width": 1024, "height": 1024 }
}
},
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset-staging.1min.ai/development/images/2026_01_12_18_11_02_110_edited.png?X-Amz-..."
}
}

Error Examples​

// At most 9 additional reference images are supported (ten in total)
{
"error": {
"code": "QWEN_IMAGE_21_INVALID_PARAMS",
"message": "At most 9 additional images are supported"
}
}
// Negative prompts are not supported by Qwen Image 2.1
{
"error": {
"code": "QWEN_IMAGE_21_INVALID_PARAMS",
"message": "negative_prompt is not supported for Qwen Image 2.1"
}
}