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 links:User Guide | Online experience (Singapore | Beijing) | Technical blog (more examples) |
Showcase
Input prompt | Output image |
|---|---|
Healing-style hand-drawn poster featuring three puppies playing with a ball on lush green grass, adorned with decorative elements such as birds and stars. The main title “Come Play Ball!” is prominently displayed at the top in bold, blue cartoon font. Below it, the subtitle “Come [Show Off Your Skills]!” appears in green font. A speech bubble adds playful charm with the text: “Hehe, watch me amaze my little friends next!”At the bottom, supplementary text reads: “We get to play ball with our friends again!” The color palette centers on fresh greens and blues, accented with bright pink and yellow tones to highlight a cheerful, childlike atmosphere. | ![]() |
Model overview
| Model | Model description | Output image specifications |
|---|---|---|
qwen-image-2.0-pro RecommendCurrently identical in capabilities to qwen-image-2.0-pro-2026-04-22 | The Pro series of Qwen image generation and editing models, with stronger capabilities in text rendering, realistic texture, and semantic adherence.For image editing, see Qwen-Image Edit. | Image resolution: 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 Recommend | ||
| qwen-image-2.0-pro-2026-04-22 | ||
| qwen-image-2.0-pro-2026-03-03 | ||
qwen-image-2.0 RecommendCurrently identical in capabilities to qwen-image-2.0-2026-03-03 | The accelerated version of the Qwen image generation and editing model, balancing quality and response speed.For image editing, see Qwen-Image Edit. | |
qwen-image-2.0-2026-03-03 Recommend |
Prerequisites
Before calling, first obtain and configure an API Key, and then configure the API Key in environment variables. To call through an SDK, please install the DashScope SDK.
Synchronous API
HTTP calls
Qwen image models support the synchronous API, which returns results in a single request with a simple calling process. It is recommended for most scenarios.
Singapore region: POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Beijing region: POST https://{WorkspaceId}.cn-beijing.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. Example value: qwen-image-2.0-pro.input object (required)Basic input information.
property messages array (required)The request content array. Only single-turn conversations are currently supported, and the array contains exactly one element.
property role string (required)The role of the message. This parameter must be set to user.content array (Required)The message content array.
property text string (Required)The positive prompt used to describe the content, style, and composition of the image you want 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 can be passed in. Passing in none or multiple texts will cause an error.object (Optional)Image processing parameters.
property negative_prompt string (Optional)The negative prompt, used to describe content that you do not want to appear in the image, to constrain the image.Both Chinese and English are supported. The length must not exceed 500 characters. Any excess will be automatically truncated.Example: low resolution, low quality, deformed limbs, deformed fingers, oversaturated image, waxy look, faces without detail, overly smooth, image with an AI look. Chaotic composition. Blurred, distorted text.size string (Optional)The resolution of the output image, in the format width*height.For 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-6 images.prompt_extend bool (Optional)Whether to enable intelligent prompt rewriting. When enabled, the model will optimize and polish the positive prompt. This feature does not modify the negative prompt.
Click to view rewriting examples Original prompt (orig_prompt): A sitting ginger cat with a joyful expression, looking lively, adorable, and incredibly lifelike.Actual prompt (actual_prompt): Photorealistic wildlife portrait: A sitting ginger cat with lush, sun-kissed fur and a vibrant, joyful expression, eyes sparkling with curiosity and warmth. The cat's head is slightly tilted, ears perked forward, mouth gently open in a contented, lively pose—exuding adorable charm and incredible lifelike detail. Soft natural lighting enhances the texture of each individual whisker and fur strand, with subtle highlights on the muzzle and inner ears. Background: a softly blurred autumn garden at golden hour—warm tones of amber leaves, dappled sunlight filtering through trees, and faint hints of mossy stone steps. Composition emphasizes the cat as the central focal point, captured in sharp focus with shallow depth of field. Style: ultra-realistic photography, National Geographic-level detail, 8K resolution, Canon EOS R5, f/1.2 aperture, cinematic lighting, true-to-life color grading, minimal post-processing. No text or overlays. bool (Optional)Whether to add a "Qwen-Image" watermark to the bottom-right corner of the image. The default value is false. Watermark style:integer (Optional)The random number seed, in the range [0,2147483647].Using the same seed parameter value keeps the generated content relatively stable. If not provided, the algorithm automatically uses a random seed.Note: The model generation process is probabilistic. Even with the same seed, identical results for each generation 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, in PNG format. The link is valid for 24 hours. Download and save the image promptly.objectTask result statistics. This parameter is not returned when using the qwen-image-2.0 series.
property TOTAL integerThe total number of tasks.SUCCEEDED integerThe number of tasks with a success status.FAILED integerThe number of tasks with a failure status.objectOutput statistics. Only successful results are counted.
property image_count integerThe number of images generated by the model, currently fixed at 1.width integerThe width (in pixels) of the image generated by the model.height integerThe height (in pixels) of the image generated by the model.stringThe unique identifier of the request, used for tracing request details and troubleshooting.codestringThe error code for a failed request. This parameter is not returned when the request succeeds. For details, see Error codes.messagestringThe detailed error information for a failed request. 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 expiration. Save the generated image promptly. |
DashScope SDK invocation
The DashScope SDK currently supports Python and Java.
The SDK parameter names are basically the same as those of the HTTP interface, with parameter structures encapsulated according to language features. For parameter descriptions of synchronous calls, see HTTP invocation.
- Python
- Java
Request example
Response example
The image link is valid for 24 hours. Download the image promptly.
Using with the OpenAI Agents SDK
Image generation models such as Qwen-Image are called through the DashScope native API and do not support the OpenAI-compatible (compatible-mode) mode, so they cannot directly serve as the reasoning model of an Agent in the OpenAI Agents SDK.
In agent frameworks such as the OpenAI Agents SDK, you can encapsulate the image generation capability as a tool (function tool), and let a text chat model that supports the OpenAI-compatible mode (such as qwen-plus) serve as the Agent's reasoning core to orchestrate the calls. Example:
Before running, install the dependencies: pip install openai-agents dashscope.
Billing and rate limits
- For the model free quota and billing unit prices, see Model Price.
- For model rate limits, see Qwen (Qwen-Image).
- Billing details: billed by the number of images successfully generated. Failed model calls or processing errors incur no charges and do not consume the new user free quota.
Error codes
If a model call fails and returns an error message, see Error codes for troubleshooting.
FAQ
Q: Should the prompt_extend parameter be enabled or disabled?
A: If you want the image content to be more diverse, with details supplemented by the model, enable this option (default). If you want more controllable image details, disable this option and optimize with the Text-to-Image Prompt Guide.
Q: What are the differences between the qwen-image-2.0 series models?
A:
-
Image generation and editing unified model: supports both text-to-image and image editing.
qwen-image-2.0-pro,qwen-image-2.0-pro-2026-04-22: the two are currently identical in capability. The Pro series offers more professional text rendering, finer photorealistic texture that renders realistic scenes in detail, and stronger semantic compliance. Only the synchronous API is supported.qwen-image-2.0,qwen-image-2.0-2026-03-03: the two are currently identical in capability. The accelerated version strikes the best balance between model quality and performance. Only the synchronous API is supported.
