generate_video
Generate a video from a text description or an input image. Supports multiple models including MiniMax, HunyuanVideo, and Mochi 1.
Instructions
Generate a video from a text prompt (text-to-video) or from an input image (image-to-video) using Fal.ai video generation models. Supports models like MiniMax (Hailuo AI), HunyuanVideo, Mochi 1, and more. Returns the URL of the generated video. Note: video generation can take 1–5 minutes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The text prompt describing the video to generate. | |
| model_id | No | The Fal.ai model ID to use for generation. Defaults to 'fal-ai/minimax-video/image-to-video' for image-to-video, or 'fal-ai/minimax-video/text-to-video' for text-to-video. Other options: 'fal-ai/hunyuan-video', 'fal-ai/mochi-v1'. | |
| image_url | No | URL of an input image to animate (for image-to-video models). When provided, defaults to using 'fal-ai/minimax-video/image-to-video'. | |
| duration | No | Desired video duration in seconds (model-dependent, not all models support this). |