Skip to main content
POST
Qwen-Image Text to Image
Qwen-Image — a 20B MMDiT model for next-gen text-to-image generation. Especially strong at creating stunning graphic posters with native text.
This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the image generation results.

Request Headers

Content-Type
string
required
Supports: application/json
Authorization
string
required
Bearer authentication format, for example: Bearer {{API Key}}.

Request Body

prompt
string
required
Text prompt for image generation.
size
string
The size of the generated media in pixels (width*height). Default is 1024*1024. Range: 256 ~ 1536 per dimension.

Response

task_id
string
required
Use the task_id to request the Task Result API to retrieve the generated outputs.

Example

Here is an example of how to use the Qwen-Image Text to Image API.
  1. Generate a task_id by sending a POST request to the Qwen-Image Text to Image API.
Request:
Response:
  1. Use task_id to get output images.
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors. You can get image url in images of response. Request:
Response:
Image files:
LLM API Providers
Last modified on January 14, 2026