WAN 2.7
Overview
WAN 2.7 is Alibaba’s video generation model that supports text-to-video, keyframe image-to-video, and reference image-to-video modes on Pixwith API.
Test API KEY: key_00000000000000000000000000000000Endpoints
1. Create Task
Request
POST https://api.pixwithapi.online/api/task/createHeaders
| Header | Value | Required |
|---|---|---|
| Content-Type | application/json | Yes |
| Api-Key | {API_KEY} | Yes |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The input prompt (e.g., “A cat walking in the garden”) |
| image_urls | array | Conditional | Image URLs. Required for 2-76 (1–2 images) and 2-44 reference mode (1–5 images). Omit for 2-44 text-to-video. |
| model_id | string | Yes | 2-44 (t2v or reference), or 2-76 (key frames) |
| options | object | Yes | Configuration options for the task |
| options.prompt_optimization | boolean | Yes | If true, all prompt words will be automatically translated into English. |
| options.aspect_ratio | string | Conditional | Required for 2-44 (t2v and reference). Valid values: '16:9', '9:16', '1:1', '4:3', '3:4'. Default: '16:9'. Not used for 2-76. |
| options.resolution | string | Required | Resolution of the output. Valid values: '720p' or '1080p' |
| options.duration | int | Required | Duration in seconds. Valid values: 5, 10, or 15 |
| options.audio_url | string | No | Reference audio URL. Upload WAV/MP3 audio (max 15 MB, 2~30 sec) for synchronized generation. Supports full URL (e.g., https://example.com/a.mp3). For 2-76 maps to driving_audio. For 2-44 reference mode maps to reference_voice on the first reference_image. |
Example Request - Text-to-Video (2-44, no images)
{
"prompt": "A cat walking in the garden",
"model_id": "2-44",
"options": {
"prompt_optimization": true,
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"audio_url": "https://example.com/audio/example_reference.mp3"
}
}Example Request - Key frames (2-76)
{
"prompt": "The scene transitions smoothly from the start frame to the end frame",
"image_urls": [
"https://cdn.pixwithapi.online/images/example_start.jpeg",
"https://cdn.pixwithapi.online/images/example_end.jpeg"
],
"model_id": "2-76",
"options": {
"prompt_optimization": true,
"resolution": "1080p",
"duration": 10,
"audio_url": "https://example.com/audio/example_reference.mp3"
}
}Example Request - Reference to Video (2-44, with images)
{
"prompt": "Image 1 walks toward Image 2 with cinematic motion",
"image_urls": [
"https://cdn.pixwithapi.online/images/example_ref_1.jpeg",
"https://cdn.pixwithapi.online/images/example_ref_2.jpeg",
"https://cdn.pixwithapi.online/images/example_ref_3.jpeg"
],
"model_id": "2-44",
"options": {
"prompt_optimization": true,
"resolution": "1080p",
"duration": 10,
"aspect_ratio": "16:9",
"audio_url": "https://example.com/audio/example_reference.mp3"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | int | 1=success, 0=error |
| message | string | Success and failure messages |
| data | object | |
| data.task_id | string | |
| data.estimated_time | int | Estimated time in seconds |
Response
{
"code": 1,
"message": "success",
"data": {
"task_id": "d425ab4dc256f0ebaa84862b9cea8a3d",
"estimated_time": 150
}
}Last updated on