Qwen Image · Image

Qwen Image · Introduction

Qwen image generation and image editing. Select the concrete model with the request body model. Text-to-image: qwen-image / qwen-image-plus / qwen-image-2.0 / qwen-image-2.0-pro / qwen-image-max / qwen-image-plus-2026-01-09, plus Wan wan2.7-image / wan2.7-image-pro (4K pro) / wan2.5-t2i-preview; image editing: qwen-image-edit-plus / wan2.5-i2i-preview (image edit / multi-image fusion). Edit / image-to-image models require images; without it the request is rejected before submission (nothing is charged). Call them through the unified POST /v1/images/generations: n is 1-4; the call is synchronous by default, add "async": true to get a task first and poll it.

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

How to call

  1. Generate: POST /v1/images/generations
  2. Poll (async, or after a sync timeout): GET /v1/images/generations/{id}

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.

Capability map

💰 See the pricing page for prices →

Common errors

Errors use the OpenAI format; branch on the status code and error.code.

StatuscodeWhen
400invalid_requestValidation failed (n above the model limit, missing prompt, images not http(s) URLs, an edit / image-to-image model without a reference image, response_format other than url, …); the reason is in message. Rejected before submission, nothing is charged.
400content_policy_violationThe prompt or inputs were blocked by content rules.
401invalid_api_keyThe key is missing or invalid.
402insufficient_quotaInsufficient balance.
403model_not_allowedThe model is not on the key allowlist.
404model_not_foundNot a supported model.
404not_foundThe task id does not exist or belongs to another account (only the key owner can read a task).
429task_limit_reachedThe concurrent task limit was reached.
502image_generation_failedThe task failed during a synchronous request.

A task that fails after submission: when polling, status: failed with error (code is image_generation_failed); a synchronous request answers 502 with the same code. Pre-deducted credits are refunded automatically.

Tip: after saving your API Key via Authorize, every capability page supports "Try it".