Skip to main content

Wan Video

Wan is a video generation model by Alibaba, supporting text-to-video, image-to-video, and first-last frame video generation.

Text-to-Video

POST /fal-ai/wan/text-to-video

Request Parameters

ParameterTypeRequiredDescription
promptstringYesVideo description prompt
modelstringNoModel name, e.g. wan-ai/wan2.1-t2v-14b
aspect_ratiostringNoAspect ratio: 16:9, 9:16, 1:1
durationstringNoVideo duration
negative_promptstringNoNegative prompt

Request Examples

curl -X POST https://crazyrouter.com/fal-ai/wan/text-to-video \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "A time-lapse of a flower blooming in a garden, soft natural lighting",
    "aspect_ratio": "16:9"
  }'

Response Example

{
  "video": {
    "url": "https://fal.media/files/.../output.mp4",
    "content_type": "video/mp4"
  },
  "seed": 42
}

Image-to-Video

POST /fal-ai/wan/image-to-video
ParameterTypeRequiredDescription
promptstringYesVideo description
image_urlstringYesReference image URL
aspect_ratiostringNoAspect ratio
cURL
curl -X POST https://crazyrouter.com/fal-ai/wan/image-to-video \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "The flower in the image starts swaying in the wind",
    "image_url": "https://example.com/flower.jpg"
  }'

First-Last Frame Video

POST /fal-ai/wan/first-last-frame
Provide first and last frame images to generate a transition video.
ParameterTypeRequiredDescription
promptstringNoTransition description
first_frame_urlstringYesFirst frame image URL
last_frame_urlstringYesLast frame image URL
cURL
curl -X POST https://crazyrouter.com/fal-ai/wan/first-last-frame \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "Smooth morphing transition",
    "first_frame_url": "https://example.com/frame_start.jpg",
    "last_frame_url": "https://example.com/frame_end.jpg"
  }'
Also available via the Unified Video API:
{
  "model": "wan-ai/wan2.1-i2v-14b-720p",
  "prompt": "Smooth transition",
  "images": [
    "https://example.com/frame_start.jpg",
    "https://example.com/frame_end.jpg"
  ]
}
Wan models excel at natural scenes and human motion. The first-last frame mode is ideal for creating smooth scene transitions.