Wan 2.7 Image Generation
Alibaba Wan 2.7 image generation model — flagship quality with 4K resolution, sequential image generation, and thinking mode. Delivers excellent Chinese and English understanding and generation capabilities.
Try it Online
Models
| Model | Description |
|---|---|
wan2.7-image-pro | Flagship edition, supports 4K |
wan2.7-image | Standard edition, up to 2K |
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="wan2.7-image-pro",
prompt="A flower shop with ornate stained-glass windows",
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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Model ID: wan2.7-image-pro or wan2.7-image |
| prompt | string | Yes | — | Image description text (CN/EN supported) |
| size | string | No | 1024x1024 | Image dimensions (width x height), see supported sizes |
| n | integer | No | 1 | Number of images: 1-4 (standard), 1-12 (sequential mode) |
| response_format | string | No | url | Response format: url or b64_json |
Extended Parameters
Wan 2.7 supports additional parameters via the parameters object:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| parameters.enable_sequential | boolean | No | false | Enable sequential generation mode for stylistically consistent image sets |
| parameters.thinking_mode | boolean | No | true | Thinking mode — the model analyzes the prompt before generating for accuracy |
| parameters.color_palette | string | No | — | Color palette to specify the overall tone and style of the generated images |
| parameters.watermark | boolean | No | false | Whether to add an AI-generated watermark |
| parameters.seed | integer | No | — | Random seed for reproducibility |
json
{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with ornate stained-glass windows",
"size": "2048x2048",
"parameters": {
"thinking_mode": true,
"watermark": false,
"seed": 42
}
}Note
Wan 2.7 models do not support negative_prompt (negative prompts) or prompt_extend (prompt expansion) parameters.
Supported Sizes
wan2.7-image-pro (Flagship, up to 4K)
| Size | Aspect Ratio |
|---|---|
4096x4096 | 1:1 |
4096x2304 | 16:9 |
2304x4096 | 9:16 |
4096x3072 | 4:3 |
3072x4096 | 3:4 |
2048x2048 | 1:1 |
2688x1536 | 16:9 |
1536x2688 | 9:16 |
2368x1728 | 4:3 |
1728x2368 | 3:4 |
1024x1024 | 1:1 |
1696x960 | 16:9 |
960x1696 | 9:16 |
1472x1104 | 4:3 |
1104x1472 | 3:4 |
1248x832 | 3:2 |
832x1248 | 2:3 |
wan2.7-image (Standard, up to 2K)
| Size | Aspect Ratio |
|---|---|
2048x2048 | 1:1 |
2688x1536 | 16:9 |
1536x2688 | 9:16 |
2368x1728 | 4:3 |
1728x2368 | 3:4 |
1024x1024 | 1:1 |
1696x960 | 16:9 |
960x1696 | 9:16 |
1472x1104 | 4:3 |
1104x1472 | 3:4 |
1248x832 | 3:2 |
832x1248 | 2:3 |
Request Examples
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-pro",
"prompt": "A flower shop with ornate stained-glass windows",
"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="wan2.7-image-pro",
prompt="A flower shop with ornate stained-glass windows",
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: 'wan2.7-image-pro',
prompt: 'A flower shop with ornate stained-glass windows',
size: '2048x2048',
n: 1,
})
console.log(response.data[0].url)Sequential Generation Example
Enable enable_sequential to generate stylistically consistent image sets — ideal for comic strips, storyboards, and series assets:
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-image-pro",
"prompt": "A kitten playing in a garden, spring, bright sunshine, watercolor style",
"size": "1024x1024",
"n": 4,
"parameters": {
"enable_sequential": true
}
}'python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="wan2.7-image-pro",
prompt="A kitten playing in a garden, spring, bright sunshine, watercolor style",
size="1024x1024",
n=4,
parameters={
"enable_sequential": True
}
)
for img in response.data:
print(img.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: 'wan2.7-image-pro',
prompt: 'A kitten playing in a garden, spring, bright sunshine, watercolor style',
size: '1024x1024',
n: 4,
parameters: {
enable_sequential: true,
},
})
for (const img of response.data) {
console.log(img.url)
}Response Format
Success Response
json
{
"created": 1717000000,
"data": [
{
"url": "https://...",
"revised_prompt": "A charming French-style flower shop with ornate stained-glass windows in vibrant colors, window sills overflowing with fresh blooms"
}
],
"usage": {
"generated_images": 1,
"total_tokens": 0
}
}| 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 |
| usage | object | Usage statistics |
| usage.generated_images | integer | Number of generated images |
| usage.total_tokens | integer | Total tokens consumed |
Error Response
See Error Codes for details.
Best Practices
- Thinking mode: Enabled by default via
thinking_mode. The model analyzes the prompt before generating, significantly improving accuracy and detail. - 4K output: Use
wan2.7-image-prowith 4K sizes (e.g.4096x4096) for print materials, advertising assets, and other high-fidelity use cases. - Sequential generation: Enable
enable_sequentialto expand thenrange to 1-12, generating stylistically consistent image series — perfect for comic strips and storyboards. - Color palette: Use
color_paletteto specify a tone style such as "warm tones" or "Morandi palette" for quick visual consistency. - Prompt tips: The more specific the description, the better the result. Include details about scene, lighting, style, and composition.
- Reproducibility: Save the
seedvalue to reproduce similar results for iterative refinement. - Watermark control: Watermarks are disabled by default (
watermark: false), so no extra steps are needed for commercial use.
Rate Limits
See Rate Limits for details.
Related Documentation
- Qwen Image 2.0 - Tongyi Qwen image generation model
- Z-Image Turbo - Fast image generation model
- Model List & Pricing - Browse available models and pricing
- Playground - Test image generation interactively