Qwen-Image Generation
Qwen-Image series image generation models with excellent Chinese language understanding and text rendering capabilities, supporting multiple sizes, batch generation, and watermark control.
Try it Online
Supported Models
| Model | Features | Max Resolution | n (Batch Size) | Response |
|---|---|---|---|---|
qwen-image-2.0-pro | Text rendering, up to 2K resolution | 2K (2368) | 1–6 | Sync |
qwen-image-2.0 | Accelerated 2.0-pro, same parameters | 2K (2368) | 1–6 | Sync |
qwen-image-max | Fixed preset sizes, high quality | 1664 | Fixed 1 | Sync |
qwen-image-plus | Fixed preset sizes, async task support | 1664 | Fixed 1 | Sync/Async |
qwen-image | Basic model, async task support | 1536 | Fixed 1 | Sync/Async |
Model Comparison
| Feature | qwen-image-2.0-pro | qwen-image-2.0 | qwen-image-max | qwen-image-plus | qwen-image |
|---|---|---|---|---|---|
| Text Rendering | Yes | Yes | No | No | No |
| Max Resolution | 2368 | 2368 | 1664 | 1664 | 1536 |
| Batch Gen (n) | 1–6 | 1–6 | 1 | 1 | 1 |
| negative_prompt | Yes | Yes | Yes | Yes | Yes |
| prompt_extend | Yes | Yes | Yes | Yes | Yes |
| Async Tasks | No | No | No | Yes | Yes |
Quick Start
python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="qwen-image-2.0-pro",
prompt="A traditional Chinese landscape painting, misty mountains with a small bridge over flowing water",
size="2048x2048",
n=1
)
print(response.data[0].url)Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /v1/images/generations |
| Base URL | https://open.dieyuyun.com |
| Protocol | OpenAI Images API |
Authentication
Bearer Token: Authorization: Bearer YOUR_API_KEY
Standard Request Fields
Common to All Models
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Model identifier. See Supported Models |
| prompt | string | Yes | — | Image description text |
| size | string | No | See size tables | Image size. Supported sizes vary by model |
| response_format | string | No | url | Response format: url or b64_json |
| watermark | boolean | No | true | Whether to add a watermark. Set to false to disable |
| seed | integer | No | — | Random seed for reproducible results |
| negative_prompt | string | No | — | Negative prompt describing unwanted content |
| prompt_extend | boolean | No | true | Whether to automatically extend the prompt for better results |
2.0 Series Models (qwen-image-2.0-pro / qwen-image-2.0)
| Field | Type | Description |
|---|---|---|
| n | integer | Number of images to generate, range 1–6 |
| size | string | Supports the following sizes (up to 2K): |
| Size | Aspect Ratio | Description |
|---|---|---|
2048x2048 | 1:1 | Square |
2688x1536 | 16:9 | Widescreen |
1536x2688 | 9:16 | Full-screen tall |
2368x1728 | 4:3 | Landscape |
1728x2368 | 3:4 | Portrait |
max / plus / Basic Models (qwen-image-max / qwen-image-plus / qwen-image)
| Field | Type | Description |
|---|---|---|
| n | integer | Fixed at 1 |
| size | string | Supports the following presets: |
| Size | Aspect Ratio | Description |
|---|---|---|
1664x928 | 16:9 | Widescreen |
1472x1104 | 4:3 | Landscape |
1328x1328 | 1:1 | Square |
1104x1472 | 3:4 | Portrait |
928x1664 | 9:16 | Full-screen tall |
Extended Parameters
Qwen-Image supports additional parameters via the parameters object:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| parameters.watermark | boolean | No | true | Whether to add a watermark. Set to false to disable |
json
{
"model": "qwen-image-2.0-pro",
"prompt": "A beautiful sunset over mountains",
"size": "2048x2048",
"parameters": {
"watermark": false
}
}Request Examples
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-2.0-pro",
"prompt": "A traditional Chinese landscape painting, misty mountains with a small bridge over flowing water",
"size": "2048x2048",
"n": 1
}'python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="qwen-image-2.0-pro",
prompt="A traditional Chinese landscape painting, misty mountains with a small bridge over flowing water",
size="2048x2048",
n=1
)
print(response.data[0].url)javascript
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://open.dieyuyun.com/v1',
apiKey: 'YOUR_API_KEY',
})
const response = await client.images.generate({
model: 'qwen-image-2.0-pro',
prompt: 'A traditional Chinese landscape painting, misty mountains with a small bridge over flowing water',
size: '2048x2048',
n: 1,
})
console.log(response.data[0].url)Batch Generation Example (2.0 Series)
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-2.0-pro",
"prompt": "An orange tabby cat sitting on a windowsill in warm sunlight, watercolor style",
"size": "2048x2048",
"n": 4
}'Disable Watermark Example
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-2.0-pro",
"prompt": "A traditional Chinese landscape painting, misty mountains with a small bridge over flowing water",
"size": "2048x2048",
"parameters": {
"watermark": false
},
"n": 1
}'Response Format
Success Response
json
{
"created": 1717000000,
"data": [
{
"url": "https://...",
"revised_prompt": "A traditional Chinese landscape painting with layered misty mountains rendered in ink wash style, a small stone bridge over a gentle stream, a thatched cottage nestled among trees"
}
]
}| Field | Type | Description |
|---|---|---|
| created | integer | Unix timestamp |
| data | array | Array of generated results |
| data[].url | string | Image URL |
| data[].revised_prompt | string | The revised/optimized prompt used for generation |
Error Response
See Error Codes for details.
Best Practices
- Chinese prompts: Qwen-Image excels at understanding Chinese prompts, making it ideal for Chinese-style art, traditional painting, and culturally specific scenes.
- Text rendering: When generating images that include text, prefer
qwen-image-2.0-proorqwen-image-2.0— they are optimized for rendering text within images. - Batch generation: The 2.0 series supports generating up to 6 images per request (
nup to 6), ideal for rapid iteration and design comparison. - Choose the right model: For quality, use
qwen-image-2.0-pro. For speed, useqwen-image-2.0. For other use cases, choosemax,plus, or the basic model. - Disable watermark: For commercial use, set
parameters.watermark: falseto generate watermark-free images. - Negative prompts: Use
negative_promptto exclude unwanted elements, e.g.negative_prompt: "blurry, low quality". - Prompt extension:
prompt_extenddefaults totrue— the system automatically enhances your prompt. Set tofalsefor precise control. - Synchronous response: The 2.0 series and max models return results synchronously. No task_id polling is needed.
- Style diversity: Supports realistic, illustration, traditional painting, oil painting, and many other styles. Specify the style explicitly in your prompt for best results.
Rate Limits
See Rate Limits for details.
Related Documentation
- Wanxiang 2.7 - Tongyi Wanxiang video generation model
- Z-Image Turbo - High-speed image generation model
- GPT Image 2 - OpenAI image generation model
- Model List & Pricing - Browse available models and pricing
- Playground - Test image generation interactively