WAN 2.6
Overview
WAN 2.6 is a high-quality video generation model that supports both text-to-video and image-to-video modes.
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 | [“https://cdn.pixwithapi.online/xxx.jpg ”]. Provide 1 image for image-to-video mode. Omit for text-to-video mode. |
| model_id | string | Yes | 2-36 |
| 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 | Required (text-to-video) | Aspect ratio of the output. Valid values: '16:9', '9:16', '1:1', '4:3', '3:4'. Default: '16:9'. Required for text-to-video mode. |
| 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.plase upload WAV/MP3 audio (max 15 MB,2~30 sec) for synchronized generation, Supports full URL (e.g., https://example.com/a.mp3) |
Example Request - Text-to-Video
{
"prompt": "A cat walking in the garden",
"model_id": "2-36",
"options": {
"prompt_optimization": true,
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"audio_url": "https://example.com/audio/example_reference.mp3"
}
}Example Request - Image-to-Video
{
"prompt": "A cat walking in the garden",
"image_urls": [
"https://cdn.pixwithapi.online/images/cf0ddb5ad6a0f0c85ab4d1dceb9fd89c_0.jpeg"
],
"model_id": "2-36",
"options": {
"prompt_optimization": true,
"resolution": "1080p",
"duration": 10,
"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