APIImage Generation
Qwen Image 2.0
Configurable fields and supported values for qwen-image-2.0.
Model ID
qwen-image-2.0
Capabilities
| Capability | Supported value |
|---|---|
| Text-to-image | Yes |
| Image-to-image | Yes |
| Multi-image reference | Yes |
Aspect ratio (aspect_ratio) | 1:1, 4:3, 3:4, 16:9, 9:16 |
resolution | Not supported; do not send |
quality | Selected automatically by the model; do not send |
| Reference field | image / image_urls |
Supports a single reference with image or multiple references with image_urls.
Configurable fields
| Field | Required | Notes |
|---|---|---|
model | Yes | Must be qwen-image-2.0. |
prompt | Yes | Text description or editing instruction. |
aspect_ratio | No | Preferred aspect-ratio field; select one supported value listed above. |
size | No | Compatibility alias for aspect_ratio. New integrations should use aspect_ratio. |
n | No | Defaults to 1; account/model limit comes from the model list API. |
image / image_urls | No | Use image for one reference or image_urls for multiple references. |
response_format | No | url (default) or b64_json. |
output_format | No | Only png is supported. |
extra_body.prompt_extend | No | Boolean prompt enhancement switch. Defaults to true. |
wait_for_completion | No | Defaults to false, which returns an asynchronous task ID. Set to true to wait in the create request. |
polling_timeout | No | Polling timeout used only when wait_for_completion is true. |
Qwen prompt enhancement uses extra_body.prompt_extend. Do not send think_level, thinking_level, or reasoning_effort.
Example
{
"model": "qwen-image-2.0",
"prompt": "Create a cinematic editorial image",
"image_urls": [
"https://example.com/subject.png",
"https://example.com/style.png"
],
"aspect_ratio": "16:9",
"extra_body": {
"prompt_extend": true
}
}Last updated on