Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Body

application/json
model
enum<string>
required

Model name. Example: qwen-image-2.0-pro.

Available options:
qwen-image-2.0-pro
input
object
required
response_format
enum<string>
default:url

Response format. url returns an image download link; b64_json returns Base64-encoded image data. Default is url.

Available options:
url,
b64_json
n
integer

Number of output images. Default is 1. For the qwen-image-2.0 series, you can generate 1-6 images.

Required range: 1 <= x <= 6
size
string
default:512*512

Output image resolution in width*height format, for example 1024*1536. For the qwen-image-2.0 series, total pixels must be between 512*512 and 2048*2048. By default, total pixels are close to 1024*1024, and the aspect ratio is close to the input image (for multi-image input, the last image). Recommended common resolutions: 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.

watermark
boolean
default:false

Whether to add a "Qwen-Image" watermark in the lower-right corner of the image. Default is false.

prompt_extend
boolean

Whether to enable smart prompt rewriting. Default is true. When enabled, the model optimizes the positive prompt (text), which is especially helpful for simple prompts.

negative_prompt
string

Negative prompt used to describe content you do not want to see in the image and to constrain the image. Chinese and English are supported. Maximum length is 500 characters.

seed
integer<int64>

Random seed. Range [0, 2147483647]. Using the same seed value can make generated content relatively stable. If omitted, the algorithm automatically uses a random seed. Note: generation is probabilistic, so the same seed cannot guarantee identical results every time.

Response

Success. Returns the image editing result.

created
integer<int64>

Creation time as a Unix timestamp (seconds).

data
object[]

List of generated images.

metadata
object

Additional result information. Field contents vary by capability.