Video GenerationWan
Wan 2.6
Generate high-quality videos up to 15 seconds with multi-shot storytelling, audio sync, and 1080p support.
POST /v2/videos/generate — model: "wan-2.6"
Alibaba Wan 2.6 — combined text-to-video and image-to-video generation at up to 1080p and 15 seconds. Supports multi-shot narrative segmentation, custom audio synchronization, and automatic prompt expansion.
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
wanParams.image | string | No | — | Image URL for image-to-video (omit for text-to-video) |
wanParams.duration | number | No | 5 | Video duration in seconds: 5, 10, or 15 |
wanParams.resolution | string | No | "720p" | Video resolution: "720p", "1080p" |
wanParams.negative_prompt | string | No | — | Elements to avoid in the generated video |
wanParams.audio | string | No | — | Audio file URL (wav/mp3, 3–30s, ≤15 MB) for synchronization |
wanParams.enable_prompt_expansion | boolean | No | — | Enable automatic prompt optimization |
wanParams.multi_shots | boolean | No | — | Enable multi-shot narrative segmentation (requires enable_prompt_expansion: true) |
wanParams.seed | number | No | — | Random seed for reproducible generation |
Credit cost
| Variant | Credits |
|---|---|
720p-5s | 5 |
720p-10s | 8 |
720p-15s | 12 |
1080p-5s | 8 |
1080p-10s | 12 |
1080p-15s | 18 |
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A warrior charges through a misty battlefield, sword raised high, rain pouring down",
"model": "wan-2.6",
"wanParams": {
"duration": 15,
"resolution": "720p",
"multi_shots": true,
"enable_prompt_expansion": true
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "A warrior charges through a misty battlefield, sword raised high, rain pouring down",
"model": "wan-2.6",
"wanParams": {
"duration": 15,
"resolution": "720p",
"multi_shots": True,
"enable_prompt_expansion": True,
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "A warrior charges through a misty battlefield, sword raised high, rain pouring down",
model: "wan-2.6",
wanParams: {
duration: 15,
resolution: "720p",
multi_shots: true,
enable_prompt_expansion: true,
},
}),
});
console.log(await response.json());Try it
POST
/v2/videos/generateTry it