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
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be IMAGE_EDITOR |
model | string | Yes | AI model identifier. Must be qwen-image-2.1-pro |
promptObject | object | Yes | Configuration object containing all image editing parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
imageUrl | string | Yes | S3 object key of the primary source image to edit (max 10MB; PNG/JPEG/WebP) | - |
prompt | string | Yes | Text description of the desired edit | - |
additional_images | array | No | Up to 9 additional reference S3 object keys (ten images in total; max 10MB each) | [] |
width | number | Yes | Output width in pixels; total pixels (width × height) must be between 512×512 (262,144) and 2048×2048 (4,194,304) | - |
height | number | Yes | Output height in pixels; total pixels (width × height) must be between 512×512 (262,144) and 2048×2048 (4,194,304) | - |
n | number | No | Number of output images to generate (1–6) | 1 |
prompt_extend | boolean | No | Enable AI prompt optimization for better results | true |
enable_thinking | boolean | No | Let the model reason while optimizing the prompt. Requires prompt_extend to be enabled | prompt_extend |
seed | number | No | Random seed for reproducible results (0–2147483647) | - |
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
- JavaScript
- Python
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
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
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
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"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
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresGenerated 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"
}
}