Skip to Content

WAN 2.2

Overview

WAN 2.2 is a high-quality video generation model that supports both text-to-video and image-to-video modes. This model offers three versions: Lite, Fast, and Pro.

Test API KEY: key_00000000000000000000000000000000

Endpoints

1. Create Task

Request

POST https://api.pixwith.ai/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_urlsarrayConditional[“https://cdn.pixwith.ai/xxx.jpg ”]. For Lite version (model_id 2-8), provide 1 image. For Fast/Pro versions (model_id 2-9, 2-10), you can provide up to 2 images (second image is optional and used as last_frame).
model_idstringYes2-8(Lite), 2-9(Pro), 2-10(Fast)
optionsobjectYesConfiguration options for the task
options.prompt_optimizationbooleanYesIf true, all prompt words will be automatically translated into English.
options.aspect_ratiostringYesAspect ratio of the output. Valid values: '16:9' or '9:16'
options.resolutionstringConditionalResolution of the output. Required for all model_ids. For model_id 2-8(Lite): only '720p' is supported. For model_id 2-9(Pro) or 2-10(Fast): '480p' or '720p'
options.durationintConditionalDuration in seconds. Not applicable for model_id 2-8(Lite - fixed duration). Required for model_id 2-9(Pro) or 2-10(Fast): 5 or 8

Example Request - Pro

{ "prompt": "A cat walking in the garden", "model_id": "2-9", "options": { "prompt_optimization": true, "aspect_ratio": "16:9", "resolution": "480p", "duration": 5 } }

Example Request - Fast

{ "prompt": "A cat walking in the garden", "image_urls": [ "https://cdn.pixwith.ai/images/cf0ddb5ad6a0f0c85ab4d1dceb9fd89c_0.jpeg" ], "model_id": "2-10", "options": { "prompt_optimization": true, "aspect_ratio": "16:9", "resolution": "480p", "duration": 5 } }

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