| Parameter Name | Data Type | Value Rules & Constraints | Function Description & Details | Default Value |
|---|---|---|---|---|
| negative_prompt | string | Supports both Chinese and English Max 500 characters; excess will be automatically truncated | Negative prompt: restricts content that should not appear in the generated image | None (recommended to be specified) |
| prompt_extend | boolean | Only accepts true / false | Positive prompt intelligent refinement switch: optimizes and polishes only the positive prompt without modifying the negative prompt | ✅ true (enabled) |
| watermark | boolean | Only accepts true / false | Watermark toggle: adds a "Qwen-Image" watermark at the bottom-right corner of the image | ❌ false (disabled) |
| size | string | Fixed format: width*height Available options👇 ▫️ 1664*928 (16:9) ▫️ 1472*1104 (4:3) ▫️ 1328*1328 (1:1) ▫️ 1104*1472 (3:4) ▫️ 928*1664 (9:16) | Output image resolution: must strictly match the specified values | 1328*1328 (1:1) |
| n | integer | Fixed to 1; setting other values will trigger an error | Number of images to generate: the current API only supports single-image generation | 1 |
| seed | integer | Value range: [0, 2147483647] A random value will be assigned if not specified | Random number seed: using the same seed improves generation stability (results are not guaranteed to be identical) | Random value |
{
"model": "qwen-image-max",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"text": "An elegant and solemn couplet hangs in the hall. The room is decorated in a quiet and classic Chinese style, with some blue and white porcelain placed on the table. On the couplet, the left side reads “Righteousness is innate; humans and machines follow the same path, and good thinking leads to new ideas”, and the right side reads “Connecting to the clouds and endowing wisdom, the universe unfolds numbers with lofty aspirations”. The horizontal scroll reads “Wisdom Initiates Tongyi”. The calligraphy is elegant and flowing. In the middle hangs a Chinese-style painting depicting the Yueyang Tower."
}
]
}
]
},
"parameters": {
"negative_prompt": "Low resolution, low image quality, limb deformities, finger deformities, over-saturated images, a wax figure-like appearance, lack of facial details, excessive smoothness, and an AI-generated look. Chaotic composition. Blurred and distorted text.",
"prompt_extend": true,
"watermark": false,
"size": "1328*1328"
}
}curl --location --request POST 'https://api.302.ai/aliyun/api/v1/services/aigc/multimodal-generation/generation' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "qwen-image-max",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"text": "An elegant and solemn couplet hangs in the hall. The room is decorated in a quiet and classic Chinese style, with some blue and white porcelain placed on the table. On the couplet, the left side reads “Righteousness is innate; humans and machines follow the same path, and good thinking leads to new ideas”, and the right side reads “Connecting to the clouds and endowing wisdom, the universe unfolds numbers with lofty aspirations”. The horizontal scroll reads “Wisdom Initiates Tongyi”. The calligraphy is elegant and flowing. In the middle hangs a Chinese-style painting depicting the Yueyang Tower."
}
]
}
]
},
"parameters": {
"negative_prompt": "Low resolution, low image quality, limb deformities, finger deformities, over-saturated images, a wax figure-like appearance, lack of facial details, excessive smoothness, and an AI-generated look. Chaotic composition. Blurred and distorted text.",
"prompt_extend": true,
"watermark": false,
"size": "1328*1328"
}
}'{
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://file.302.ai/gpt/imgs/20250821/b7a6dce523e947859f0d1cc3c985f099.png"
}
]
}
}
]
},
"usage": {
"width": 1248,
"image_count": 1,
"height": 832
},
"request_id": "83c1cd46-35aa-9c2a-9e41-ac788b8fcfdc"
}