Skip to content

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.

Supported Models

ModelFeaturesMax Resolutionn (Batch Size)Response
qwen-image-2.0-proText rendering, up to 2K resolution2K (2368)1–6Sync
qwen-image-2.0Accelerated 2.0-pro, same parameters2K (2368)1–6Sync
qwen-image-maxFixed preset sizes, high quality1664Fixed 1Sync
qwen-image-plusFixed preset sizes, async task support1664Fixed 1Sync/Async
qwen-imageBasic model, async task support1536Fixed 1Sync/Async

Model Comparison

Featureqwen-image-2.0-proqwen-image-2.0qwen-image-maxqwen-image-plusqwen-image
Text RenderingYesYesNoNoNo
Max Resolution23682368166416641536
Batch Gen (n)1–61–6111
negative_promptYesYesYesYesYes
prompt_extendYesYesYesYesYes
Async TasksNoNoNoYesYes

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

ItemValue
MethodPOST
Path/v1/images/generations
Base URLhttps://open.dieyuyun.com
ProtocolOpenAI Images API

Authentication

Bearer Token: Authorization: Bearer YOUR_API_KEY

Standard Request Fields

Common to All Models

FieldTypeRequiredDefaultDescription
modelstringYesModel identifier. See Supported Models
promptstringYesImage description text
sizestringNoSee size tablesImage size. Supported sizes vary by model
response_formatstringNourlResponse format: url or b64_json
watermarkbooleanNotrueWhether to add a watermark. Set to false to disable
seedintegerNoRandom seed for reproducible results
negative_promptstringNoNegative prompt describing unwanted content
prompt_extendbooleanNotrueWhether to automatically extend the prompt for better results

2.0 Series Models (qwen-image-2.0-pro / qwen-image-2.0)

FieldTypeDescription
nintegerNumber of images to generate, range 1–6
sizestringSupports the following sizes (up to 2K):
SizeAspect RatioDescription
2048x20481:1Square
2688x153616:9Widescreen
1536x26889:16Full-screen tall
2368x17284:3Landscape
1728x23683:4Portrait

max / plus / Basic Models (qwen-image-max / qwen-image-plus / qwen-image)

FieldTypeDescription
nintegerFixed at 1
sizestringSupports the following presets:
SizeAspect RatioDescription
1664x92816:9Widescreen
1472x11044:3Landscape
1328x13281:1Square
1104x14723:4Portrait
928x16649:16Full-screen tall

Extended Parameters

Qwen-Image supports additional parameters via the parameters object:

FieldTypeRequiredDefaultDescription
parameters.watermarkbooleanNotrueWhether 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"
    }
  ]
}
FieldTypeDescription
createdintegerUnix timestamp
dataarrayArray of generated results
data[].urlstringImage URL
data[].revised_promptstringThe 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-pro or qwen-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 (n up to 6), ideal for rapid iteration and design comparison.
  • Choose the right model: For quality, use qwen-image-2.0-pro. For speed, use qwen-image-2.0. For other use cases, choose max, plus, or the basic model.
  • Disable watermark: For commercial use, set parameters.watermark: false to generate watermark-free images.
  • Negative prompts: Use negative_prompt to exclude unwanted elements, e.g. negative_prompt: "blurry, low quality".
  • Prompt extension: prompt_extend defaults to true — the system automatically enhances your prompt. Set to false for 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.