Generate Images
Reference for Qwen-Image and Wan text-to-image models: model comparison, negative prompts, prompt rewriting, size, watermark and seed, with request examples.
(Model Studio Qwen-Image Series)
Generate images with the Qwen-Image models from the Tongyi Qianwen Model Studio series. This endpoint supports automatic prompt optimization and a deep understanding of Chinese-style aesthetics.
Basics
- Endpoint:
POST /v1/images/generations - Authentication:
Bearer Token - Content type:
application/json
Model Overview
Wan Models
| Model | Description | Output image format |
|---|---|---|
| wan2.6-t2i (Recommended) | Wan 2.6. Free size selection within total-pixel-area and aspect-ratio constraints (same as wan2.5) | Image resolution: total pixels in [12801280, 14401440]. Aspect ratio: [1:4, 4:1]. Image format: png |
| wan2.5-t2i-preview (Recommended) | Wan 2.5 preview. Free size selection within total-pixel-area and aspect-ratio constraints (e.g. supports 768*2700, whereas 2.2 and earlier cap each side at 1400) | |
| wan2.2-t2i-flash | Wan 2.2 Flash. 50% faster than the 2.1 models | Image resolution: width and height both in [512, 1440] pixels. Image format: png |
| wan2.2-t2i-plus | Wan 2.2 Pro. Across-the-board improvements in stability and success rate over 2.1 | |
| wanx2.1-t2i-turbo | Wan 2.1 Flash | |
| wanx2.1-t2i-plus | Wan 2.1 Pro | |
| wanx2.0-t2i-turbo | Wan 2.0 Flash |
Qwen Models
| Model | Description | Output image specs |
|---|---|---|
| qwen-image-2.0-pro | Qwen image generation and editing Pro series. Stronger text rendering, realistic textures, and semantic adherence. | Image resolution: width and height can be set freely; total pixels must be between 512 and 2048. Default resolution is 2028*2048. Image format: png. Number of images: 1-6 |
| qwen-image-plus-2026-01-09 | Qwen image generation Plus series. Excels at diverse artistic styles and text rendering. | Image resolution: default is 1664*928. Available resolutions and their aspect ratios: 1664*928 (default): 16:9; 1472*1104: 4:3; 1328*1328: 1:1; 1104*1472: 3:4; 928*1664: 9:16 |
| qwen-image |
Request Headers
Content-Type string (Required)
Request content type. This parameter must be set to application/json.
Authorization string (Required)
Request authentication. The endpoint authenticates with your API key. Example: Bearer sk-xxxx.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model name, e.g. qwen-image-plus or qwen-image-max. |
| input | object | Yes | Image description text |
| └─ messages | array[object] | Yes | Message list |
| └─ └─ role | string | No | Role |
| └─ └─ content | array[object] | ||
| └─ └─ └─ text | string | Prompt description text | |
| parameters | object | No | Parameter object that controls the generation result. |
| └─negative_prompt | string | No | Negative prompt describing content you do not want in the image, used to constrain the output. Supports Chinese and English, up to 500 characters; anything beyond the limit is truncated. Example: low resolution, low quality, deformed limbs, deformed fingers, oversaturated, waxy look, faces without detail, overly smooth, AI-looking image, chaotic composition, blurry or distorted text. |
| └─prompt_extend | boolean | No | Whether to enable intelligent prompt rewriting. When enabled, the model optimizes and polishes the positive prompt. This does not modify the negative prompt. - true: default; enables intelligent rewriting. Recommended if you want more varied images with details filled in by the model. - false: disables intelligent rewriting. Recommended if you want more control over image details. |
| └─watermark | boolean | No | Whether to add a "Qwen-Image" watermark in the bottom-right corner of the image. Default is false. Watermark style: the Qwen logo. |
| └─size | string | No | Image size, e.g. 1328*1328, 1024*1024. Width and height must both be in the 512-1440 range. |
| └─n | integer | No | Number of images to generate. Range 1~4, default 4. Note: billed per image; set to 1 when testing. |
| └─seed | integer | No | Random seed, in the range [0,2147483647]. Using the same seed keeps generated content relatively stable. If not provided, a random seed is used automatically. Note: generation is probabilistic; even with the same seed, results are not guaranteed to be identical every time. |
Response
Status code: 200 OK
| Field | Type | Description |
|---|---|---|
| created | integer | Unix timestamp of creation. |
| data | array | List of generation results. |
| └─ url | string | Download link of the generated image. |
| └─ b64_json | string | Base64-encoded image data (if requested). |
| └─ revised_prompt | string | The final prompt after automatic AI optimization. |
Request Example
{
"model": "wan2.2-t2i-flash",
"prompt": "A kitten running on the grass, cinematic, natural lighting",
"size": "960*1390"
}📝 Response Example
{
"created": 1713833628,
"data": [
{
"url": "https://example.com/qwen_output_image.png",
"b64_json": "",
"revised_prompt": ""
}
]
...
}💡 Developer Tips
- Text understanding: The Qwen model series is exceptionally good at rendering Chinese idioms, couplets, and Chinese-style imagery (such as Yueyang Tower or blue-and-white porcelain).
- Prompt optimization: Keep
prompt_extend: true— it makes the generated images richer in detail.
Image Editing
Guide to Qwen-Image-Edit models: edit single images, fuse multiple images or control structure from reference images and prompts, with parameters and examples.
Create Image-to-Video Task
Hailuo image-to-video API guide: turn a first-frame image plus prompt and camera directives into video with MiniMax-Hailuo models, with parameters and examples.