The Qwen text-to-image model (Qwen-Image) is a general-purpose image generation model that supports a variety of artistic styles and excels at complex text rendering. The model supports multi-line layouts, paragraph-level text generation, and fine-grained detail depiction, enabling complex mixed text-and-image layout design.
Quick access:User Guide | Online experience (Beijing | Singapore) | Technical blog |
Showcases
Input prompt | Output image |
|---|---|
A wintry urban street scene in Beijing: two adjacent Chinese-style shops with grey-green tiled roofs and vermilion outer walls stand side by side, warm-glowing lanterns printed with paper-cut horses hanging under the eaves, casting a soft halo in the overcast diffused light and reflecting a delicate sheen on the damp cobblestone pavement. On the left is a calligraphy shop: on an aged indigo signboard, the words “text rendering” are carved in vigorous running script. On the glass at the shop entrance hangs a piece of calligraphy, written top to bottom in Tian Yingzhang hard-pen script: “professional slides, Chinese-English posters, premium infographics”, signed with a cinnabar seal reading “1k token”. On the interior wall of the shop, three vertical calligraphy works can be dimly made out, the first reading “Alibaba”, the second “Qwen”, and the third “Image Generation”. A white-haired old man stands with his back to the camera, admiring them. On the right is a flower shop, whose signboard spells out “photorealistic texture” in fresh flowers; multi-tiered racks inside display red roses, pink ranunculus, and green plants, a round floral badge on the door reads “2k resolution”, and a colorful neon sign at the entrance reads “fine detail, people, nature, architecture”. Between the two shops stands a snowman holding up an old-fashioned small blackboard with the chalk words “Qwen-Image-2.0 officially released”. On the left of the street, a young couple nestles together; the girl, with a slim face, wears an off-white cashmere coat and flesh-colored bare-leg tights. She holds a heart-shaped transparent balloon printed in white with “generation and editing in one”; inside it sits a fluffy capybara plush toy. The boy wears a well-tailored dark-grey wool coat over a light-colored high-neck sweater. On the right of the street, a rider with “smaller model, faster speed” written on his back speeds past. The whole street interweaves light and shadow, motion and stillness in perfect balance. | ![]() |
Model Overview
| Model | Model Description | Output Image Specifications |
|---|---|---|
qwen-image-2.0-pro RecommendedCurrently has the same capabilities as qwen-image-2.0-pro-2026-04-22 | The Pro series of Qwen image generation and editing models. Stronger text rendering, photorealistic texture, and semantic compliance capabilities.For image editing, see Qwen-Image Editing. | Image resolution: The width and height can be set freely, and the total pixels of the output image must be between 512512 and 20482048. The default resolution is 2048*2048.Image format: pngNumber of images: 1-6 |
qwen-image-2.0-pro-2026-06-22 Recommended | ||
| qwen-image-2.0-pro-2026-04-22 | ||
| qwen-image-2.0-pro-2026-03-03 | ||
qwen-image-2.0 RecommendedCurrently has the same capabilities as qwen-image-2.0-2026-03-03 | Accelerated version of the Qwen image generation and editing model, balancing quality and response speed.For image editing, see Qwen-Image Editing. | |
qwen-image-2.0-2026-03-03 Recommended |
Prerequisites
Before calling, first obtain and configure an API Key, and then configure the API Key in environment variables. To make calls through an SDK, please install the DashScope SDK.
Synchronous API
HTTP calls
Qwen image models support synchronous APIs, which return results in a single request. The calling process is simple, making them recommended for most scenarios.
Beijing region: POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Singapore region: POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
When calling, replace {WorkspaceId} with your actual Workspace ID.
Request parametersRequest HeadersContent-Typestring(Required)Request content type. This parameter must be set to application/json.Authorizationstring(Required)Request authentication. The API uses the Alibaba Cloud Bailian API Key for authentication. Example value: Bearer sk-xxxx.Request Bodymodelstring (Required)Model name. Example value: qwen-image-2.0-pro.input object (Required)Basic input information.
Property messages array (Required)Array of request content. Currently only single-turn conversations are supported, and the array contains exactly one element.
Property role string (required)The role of the message. This parameter must be set to user.contentarray (required)The message content array.
Property text string(required)The positive prompt describes the image content, style, and composition you expect to generate.Both Chinese and English are supported. For qwen-image-2.0 series models, the maximum length is 1300 tokens; for other models, it is 800 tokens. Any excess will be automatically truncated.Note: Only one text is supported. Omitting it or passing multiple will cause an error.object (optional)Image processing parameters.
Property negative_prompt string (optional)The negative prompt describes content you do not want to appear in the image, constraining the output.Both Chinese and English are supported, with a maximum length of 500 characters. Any excess will be automatically truncated.Example: low resolution, poor quality, deformed limbs, deformed fingers, oversaturated image, waxy look, faces lacking detail, overly smooth, AI-looking image. Chaotic composition. Blurry, distorted text.size string (optional)The resolution of the output image, in the format width*height.qwen-image-2.0 series models: The total pixels of the output image must be between 512*512 and 2048*2048, and the default resolution is 2048*2048. Recommended resolutions:
integer (optional)The number of output images. The default value is 1.For qwen-image-2.0 series models, you can choose to output 1 to 6 images.prompt_extend bool (optional)Whether to enable intelligent prompt rewriting. When enabled, the model optimizes and refines the positive prompt. This feature does not modify the negative prompt.
Click to view rewriting examples Original prompt (orig_prompt): A seated orange tabby cat with a cheerful expression, lively and adorable, realistic and accurate.Actual prompt (actual_prompt): A seated orange tabby cat with fluffy, soft fur, sunlight streaming through the window onto its body and giving it a warm sheen. The cat has a well-proportioned build, its limbs naturally bent as it sits steadily on the wooden floor, its tail curled gently by its side, looking especially relaxed and elegant. Its large eyes are round and bright, with slightly contracted pupils revealing a cheerful, lively expression; the corners of its mouth are slightly raised, as if it is enjoying a wonderful moment. Its ears tilt slightly forward, showing liveliness and curiosity. The background is a cozy modern living room with light wood flooring, a half-open window letting in soft natural light, a lush green courtyard visible outside, and a few potted plants on the windowsill. The image uses a realistic photography style, with lifelike details and rich layers of light and shadow, highlighting the texture of the cat's fur, its expression and gaze, and the natural liveliness of its overall posture, creating a relaxed, pleasant atmosphere full of everyday warmth. bool (optional)Whether to add the "Qwen-Image" watermark to the lower-right corner of the image. The default value is false. Watermark style:integer (optional)Random number seed, with a value range of [0,2147483647].Using the same seed parameter value keeps the generated content relatively stable. If not provided, the algorithm automatically uses a random number seed.Note: The model generation process is probabilistic; even with the same seed, completely identical generation results are not guaranteed. |
|
Response parametersoutputobjectTask output information.
Property choices arrayThe output content generated by the model. This array contains only one element.
Property finish_reason stringThe reason the task stopped; stop when it stops naturally.message objectThe message returned by the model.
Property role stringThe role of the message, fixed as assistant.contentarray
Property image stringThe URL of the generated image, with the image format being PNG. The link is valid for 24 hours. Please download and save the image promptly.objectTask result statistics. This value is not returned when using the qwen-image-2.0 series.
Property TOTAL integerTotal number of tasks.SUCCEEDED integerNumber of tasks with a successful status.FAILED integerNumber of tasks with a failed status.objectOutput information statistics. Only successful results are counted.
Property image_count integerThe number of images generated by the model, currently fixed at 1.width integerThe width of the image generated by the model (in pixels).height integerThe height of the image generated by the model (in pixels).stringThe unique request identifier, which can be used for request detail tracing and troubleshooting.codestringThe error code returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes.messagestringThe detailed error information returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes. |
The image URL is retained for only 24 hours and is automatically cleared after it expires. Please save the generated image promptly. |
DashScope SDK Calls
The DashScope SDK currently supports Python and Java.
The SDK parameter names are basically identical to those of the HTTP interface, with the parameter structures encapsulated according to language characteristics. For parameter descriptions of synchronous calls, see HTTP Calls.
- Python
- Java
Request example
Response example
Image URLs expire after 24 hours. Download the images promptly.
Use with the OpenAI Agents SDK
Image generation models such as Qwen-Image are called through the DashScope native API and do not support OpenAI-compatible (compatible-mode) mode, so they cannot be used directly as the reasoning model of an Agent in the OpenAI Agents SDK.
In agent frameworks such as the OpenAI Agents SDK, you can wrap image generation as a tool (function tool) and let a text chat model that supports OpenAI-compatible mode (such as qwen-plus) act as the Agent's reasoning core to orchestrate it. For example:
Before running, install the dependencies: pip install openai-agents dashscope.
Billing and rate limiting
- For free quotas and pricing, see Model pricing.
- For rate limits, see Qwen-Image.
- Billing details: Each successfully generated image is billed. Failed calls or processing errors do not incur charges or consume your new user free quota.
Error codes
If the model call fails and returns an error message, see Error codes for resolution.
FAQ
Q: Should I enable or disable the prompt_extend parameter?
A: Enable this option (default) if you want more diverse image content and for the model to add details. Disable it if you need tighter control over image details, and optimize your prompts using the Text-to-Image Prompt Guide.
Q: What are the differences between qwen-image-2.0 series models?
A:
-
Combined image generation and editing models: Support both text-to-image and image editing.
qwen-image-2.0-proandqwen-image-2.0-pro-2026-04-22: Same capabilities. The Pro series delivers more professional text rendering, finer realistic textures, detailed realistic scenes, and stronger semantic adherence. Supports synchronous calls only.qwen-image-2.0andqwen-image-2.0-2026-03-03: Same capabilities. The accelerated version balances model performance and quality. Supports synchronous calls only.
Q: How do I get the domain name whitelist for image storage?
A: Images generated by models are stored in Alibaba Cloud OSS. The API returns a temporary public URL (valid for 24 hours; download and save it promptly). The image URL domain format is dashscope-{marker}.oss-accelerate.aliyuncs.com or dashscope-{marker}.oss-cn-{region}.aliyuncs.com. If you need to configure a firewall whitelist for the download address, note the following: because the underlying storage changes dynamically, the bucket names below are for reference only and may change at any time: dashscope-a717, dashscope-66f3, dashscope-7c2c, dashscope-2522, dashscope-c72b, dashscope-0484, dashscope-7e0f, dashscope-5859, dashscope-5496, dashscope-35f9, dashscope-31d9, dashscope-7f1f, dashscope-cc75, dashscope-64e9. To prevent outdated information from affecting access, this document does not provide a fixed OSS domain whitelist. If you have security control requirements, contact your account manager to obtain the latest OSS domain list. The API currently returns URLs only and does not support base64 output.