Skip to Content

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_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwithapi.online/api/task/create

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Api-Key{API_KEY}Yes

Request Parameters

ParameterTypeRequiredDescription
promptstringYesThe input prompt (e.g., “A cat walking in the garden”)
image_urlsarrayConditionalImage URLs. Required for 2-76 (1–2 images) and 2-44 reference mode (1–5 images). Omit for 2-44 text-to-video.
model_idstringYes2-44 (t2v or reference), or 2-76 (key frames)
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.aspect_ratiostringConditionalRequired 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.resolutionstringRequiredResolution of the output. Valid values: '720p' or '1080p'
options.durationintRequiredDuration in seconds. Valid values: 5, 10, or 15
options.audio_urlstringNoReference 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

ParameterTypeDescription
codeint1=success, 0=error
messagestringSuccess and failure messages
dataobject
data.task_idstring
data.estimated_timeintEstimated time in seconds

Response

{ "code": 1, "message": "success", "data": { "task_id": "d425ab4dc256f0ebaa84862b9cea8a3d", "estimated_time": 150 } }
Last updated on