⌘K

Qwen Image Edit Plus

qwen_image_edit_plus

The image editing model supports multiple image inputs and outputs. It can precisely modify the text within the image, add, delete or move objects, change the main character's actions, transfer the image style, and enhance the details of the picture.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID used for the request

Value: qwen_image_edit_plus


input object required

Input parameter object

messages array required

Request content array. Only single-turn conversation is currently supported, so the array must contain exactly one object with role and content

role string required

Message sender role

Value: user

content array required

Message content array. It must contain 1 - 3 image items in {"image": "..."} format and exactly one edit instruction in {"text": "..."} format

image string required

Input image URL or Base64 encoded data. Supports 1 - 3 input images

For multi-image input, image order follows the array order, and output image ratio follows the last image
Supported formats: JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF
Output image format is PNG. For GIF input, only the first frame is processed
Recommended resolution for best quality: both width and height between 384 and 3072 pixels. Too low may cause blur, too high may increase processing time
Maximum image size: 10MB
Supports public URL input and Base64 image strings
Public URL supports HTTP and HTTPS protocols
URL example: https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/fpakfo/image36.webp
Base64 example: data:image/jpeg;base64,GDU7MtCZz...

text string required

Positive prompt for expected image content, style, and composition
Supports Chinese and English, maximum 800 characters. Each Chinese character, letter, number, or symbol counts as one character, and overflow is automatically truncated
Example: Make the girl in image 1 wear the black dress in image 2 and sit in the pose of image 3, while keeping outfit details, hairstyle, and expression unchanged, with natural and smooth movement
Only one text is supported. Missing text or multiple text entries will return an error

parameters object

Additional control parameters for image generation

n integer

Number of output images

Supports 1 - 6 output images

Default: 1

negative_prompt string

Negative prompt for unwanted content constraints
Supports Chinese and English, maximum 500 characters. Each Chinese character, letter, number, or symbol counts as one character, and overflow is automatically truncated
Example: low resolution, errors, worst quality, low quality, mutilated, extra fingers, bad proportions

size string

Output image resolution in width*height format, for example 1024*1536. Width and height must both be in range 512 - 2048
Recommended resolutions by common ratio:
1:1: 1024*1024, 1536*1536
2:3: 768*1152, 1024*1536
3:2: 1152*768, 1536*1024
3:4: 960*1280, 1080*1440
4:3: 1280*960, 1440*1080
9:16: 720*1280, 1080*1920
16:9: 1280*720, 1920*1080
21:9: 1344*576, 2048*872
Output size rules: if size is provided, the system targets that size, then adjusts actual output dimensions to the nearest multiples of 16. Example: if set to 1033*1032, actual output becomes 1040*1024
If size is not provided, output keeps a ratio close to the input image, or the last image for multi-image input, with total pixel count close to 1024*1024

prompt_extend boolean

Whether to enable intelligent prompt rewriting

When enabled, the model optimizes the positive prompt (text). This is especially useful for simple prompts
Default: true

watermark boolean

Whether to add Qwen-Image watermark at the bottom-right corner

Default: false

seed integer

Random seed

Range: 0 - 2147483647
Using the same seed can keep generated content relatively stable. If omitted, a random seed is used automatically
Generation is probabilistic, so even with the same seed, results are not guaranteed to be exactly identical


Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.


Response Format

error object

Error information. Only present when status is failed

code integer

Error code

error_message string

Detailed error message


output array

Generation results. Only present when status is completed

content array

Generated content list

type string

Resource type

Value: image

url string

Generated image URL


usage object

Usage statistics. Only present when status is completed


metadata object

Metadata information