wan2.6 series
wan2.6 Series Unified Endpoint Guide
- This page documents the actual relay behavior of
POST /v1/images/generationsforwan2.6-t2iandwan2.6-image. - The focus is unified-endpoint parameter behavior, not only surface field names.
Basic Information
| Item | Description |
|---|---|
| Models | wan2.6-t2i, wan2.6-image |
| Type | Text-to-image / Image editing |
| Unified endpoint | POST /v1/images/generations |
| Auth | Authorization: Bearer YOUR_API_KEY |
Prepare these variables:
BASE_URL="https://api-platform.ope.ai"
API_KEY="YOUR_API_KEY"
For pricing, see Model Pricing.
1. Unified Field Behavior
| Unified field | Platform handling | Notes |
|---|---|---|
model | Direct handling | Supports wan2.6-t2i / wan2.6-image |
prompt | Structured write | Written as text content in request payload |
image | Structured write | Supports URL / Base64 / arrays, flattened in order |
size | Normalization | WxH is normalized to W*H (for example, 1280x1280 -> 1280*1280) |
n | Direct handling | Used as image-count parameter |
Notes:
- For
wan2.6, this unified path runs in sync mode. - On this path,
response_formatis not used forwan2.6. quality,style,user,output_format,output_compression,background, andmoderationare ignored on this path.
2. wan2.6-t2i Parameters and Sizes
Official references:
n (image count)
- Official range:
1~4 - Official default:
4 - Platform unified endpoint default:
1(if omitted)
size (resolution)
- Format:
width*height(you can sendwidthxheight; gateway rewrites it to*) - Official default:
1280*1280 - Pixel budget constraint: around
[1280*1280, 1440*1440], ratio range[1:4, 4:1]
Common recommended sizes:
1:1:1280x12803:4:1104x14724:3:1472x11049:16:960x169616:9:1696x960
3. wan2.6-image Parameters and Image Constraints
Official reference:
image constraints on the platform unified endpoint
- For
wan2.6-image, gateway validation requiresimageand enforces1~4images. - For multi-image input, array order is preserved when expanded to multiple
content[].imageitems.
Official image limits:
- Formats:
JPEG,JPG,PNG(no alpha),BMP,WEBP - Resolution: width and height each in
[240, 8000] - File size: up to
10MB
About enable_interleave
POST /v1/images/generationscurrently does not exposeparameters.enable_interleave.- If you need Aliyun-native parameters such as
enable_interleave,prompt_extend, orwatermark, use Aliyun Image Generation (POST /aliyun/v1/images/generations) with nativeinput/messages/parameterspayload.
4. Request Examples
4.1 wan2.6-t2i (text-to-image)
curl --request POST "$BASE_URL/v1/images/generations" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "wan2.6-t2i",
"prompt": "A futuristic robot in front of a glass facade, cinematic lighting, high detail.",
"size": "1280x1280",
"n": 4
}'
4.2 wan2.6-image (image edit, multi-image input)
curl --request POST "$BASE_URL/v1/images/generations" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "wan2.6-image",
"prompt": "Keep the subject and improve texture quality with a new background mood.",
"size": "1472x1104",
"n": 2,
"image": [
"https://example.com/reference-1.jpg",
"https://example.com/reference-2.jpg"
]
}'