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 the qwen-image-2.0 series, total output pixels must be between 512*512 and 2048*2048, and the default resolution is 2048*2048. Recommended resolutions: 2688*1536 (16:9), 1536*2688 (9:16), 2048*2048 (1:1, default), 2368*1728 (4:3), and 1728*2368 (3:4).

negative_prompt
string

Negative prompt used to describe content that should not appear in the image and to constrain the image. Chinese and English are supported. Maximum length is 500 characters; extra content is automatically truncated. Example: low resolution, low quality, malformed limbs, malformed fingers, oversaturated image, wax figure appearance, no facial details, overly smooth, AI-like image, chaotic composition, blurry or distorted text.

prompt_extend
boolean

Whether to enable smart prompt rewriting. When enabled, the model optimizes and polishes the positive prompt. This feature does not modify the negative prompt. true (default): enabled, recommended for more diverse content. false: disabled, recommended for more controllable details.

watermark
boolean
default:false

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

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.

Required range: x >= 0

Response

Success. Returns the image generation result.

created
integer<int64>

Response generation timestamp.

data
object[]

List of generated image results.

metadata
object

Pass-through raw response metadata from the upstream provider.