Qwen Image · Image

Text to ImageNEW

Generate images from text with Qwen image models.

💡 When to use:Use for high-quality Qwen / Wanxiang style image generation.

This page uses the unified API: generate with POST /v1/images/generations (synchronous by default: it returns once the image is ready; add "async": true to get a task back immediately and poll GET /v1/images/generations/{id}), authenticate with Authorization: Bearer <key>; errors use the OpenAI format. General notes are in the Images guide. Images guide
Generate image
POST/ v1/ images/ generations
Query Result
GET/ v1/ images/ generations/ {id}
⏱ Recommended polling interval:Synchronous (default): the server waits for the image and answers 200 with data[].url; if it is still not done after 110 seconds it answers 202 with the task object and a Location header. The task keeps running, so do not resubmit (there is no double charge); fetch the result with GET /v1/images/generations/{id}. Asynchronous ("async": true or the Prefer: respond-async header): answers 202 with the task object right away (status: queued, Retry-After: 3); poll with GET until status is completed or failed.

Authorization

AuthorizationstringheaderRequired
API key, sent as a Bearer token in the Authorization header.

Request body

application/json
modelstringRequired
qwen-image / qwen-image-plus / qwen-image-2.0 / qwen-image-2.0-pro / qwen-image-max / qwen-image-plus-2026-01-09 / wan2.7-image / wan2.7-image-pro / wan2.5-t2i-preview
promptstringRequired
Image description
aspect_ratiostring
Output ratio: 1:1 / 16:9 / 9:16 / 4:3 / 3:4 / 2:3 / 3:2 / 21:9
ninteger
Number of images, default 1 (affects billing)
negative_promptstring
Negative prompt
prompt_extendboolean
Whether to extend the prompt, default true
webhookUrlstring
Completion webhook URL
sizestring
`WIDTHxHEIGHT` (for example `1024x1024`): converted to the nearest aspect ratio the channel accepts; `aspect_ratio` wins when both are sent. nano / gemini also accept `auto`.
asyncboolean
`true`: answer 202 with the task object right away, then poll with GET (the `Prefer: respond-async` header works too). Synchronous by default.

model, prompt, n, size, aspect_ratio, resolution, images, output_format, negative_prompt, prompt_extend and async are the common fields; the server converts them to the channel fields. Other fields in the table are native to the channel: put them in the same body under their own names and they are passed through, and a native field wins over its unified synonym. images takes http(s) image URLs only (no base64). response_format can only be url.

Response fields

idstring
Task ID, starts with img_; used for polling.
objectstring
Always image.generation.
modelstring
The model from the request.
statusstring
queued, in_progress, completed or failed. A synchronous 200 is always completed.
createdinteger
Creation time (Unix seconds), as in OpenAI Images.
completed_atinteger | null
Completion time; null until completed.
errorobject | null
On failure {code, message}, with code image_generation_failed.
dataarray
When completed, [{ "url": "https://..." }], one element per image (several when n is above 1, or for the 4 Midjourney images); an empty array until then.