GuideImage GenerationQwan

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

ModelDescriptionOutput 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-flashWan 2.2 Flash. 50% faster than the 2.1 modelsImage resolution: width and height both in [512, 1440] pixels. Image format: png
wan2.2-t2i-plusWan 2.2 Pro. Across-the-board improvements in stability and success rate over 2.1
wanx2.1-t2i-turboWan 2.1 Flash
wanx2.1-t2i-plusWan 2.1 Pro
wanx2.0-t2i-turboWan 2.0 Flash

Qwen Models

ModelDescriptionOutput image specs
qwen-image-2.0-proQwen 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-09Qwen 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

ParameterTypeRequiredDescription
modelstringYesModel name, e.g. qwen-image-plus or qwen-image-max.
inputobjectYesImage description text
└─ messagesarray[object]YesMessage list
└─ └─ rolestringNoRole
└─ └─ contentarray[object]
└─ └─ └─ textstringPrompt description text
parametersobjectNoParameter object that controls the generation result.
└─negative_promptstringNoNegative 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_extendbooleanNoWhether 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.
└─watermarkbooleanNoWhether to add a "Qwen-Image" watermark in the bottom-right corner of the image. Default is false. Watermark style: the Qwen logo.
└─sizestringNoImage size, e.g. 1328*1328, 1024*1024. Width and height must both be in the 512-1440 range.
└─nintegerNoNumber of images to generate. Range 1~4, default 4. Note: billed per image; set to 1 when testing.
└─seedintegerNoRandom 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

FieldTypeDescription
createdintegerUnix timestamp of creation.
dataarrayList of generation results.
└─ urlstringDownload link of the generated image.
└─ b64_jsonstringBase64-encoded image data (if requested).
└─ revised_promptstringThe 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

  1. 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).
  2. Prompt optimization: Keep prompt_extend: true — it makes the generated images richer in detail.

On this page