Skip to main content

wan2.6 series

wan2.6 Series Unified Endpoint Guide

  1. This page documents the actual relay behavior of POST /v1/images/generations for wan2.6-t2i and wan2.6-image.
  2. The focus is unified-endpoint parameter behavior, not only surface field names.

Basic Information

ItemDescription
Modelswan2.6-t2i, wan2.6-image
TypeText-to-image / Image editing
Unified endpointPOST /v1/images/generations
AuthAuthorization: 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 fieldPlatform handlingNotes
modelDirect handlingSupports wan2.6-t2i / wan2.6-image
promptStructured writeWritten as text content in request payload
imageStructured writeSupports URL / Base64 / arrays, flattened in order
sizeNormalizationWxH is normalized to W*H (for example, 1280x1280 -> 1280*1280)
nDirect handlingUsed as image-count parameter

Notes:

  • For wan2.6, this unified path runs in sync mode.
  • On this path, response_format is not used for wan2.6.
  • quality, style, user, output_format, output_compression, background, and moderation are 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 send widthxheight; 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: 1280x1280
  • 3:4: 1104x1472
  • 4:3: 1472x1104
  • 9:16: 960x1696
  • 16: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 requires image and enforces 1~4 images.
  • For multi-image input, array order is preserved when expanded to multiple content[].image items.

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/generations currently does not expose parameters.enable_interleave.
  • If you need Aliyun-native parameters such as enable_interleave, prompt_extend, or watermark, use Aliyun Image Generation (POST /aliyun/v1/images/generations) with native input/messages/parameters payload.

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"
]
}'