Generate Video
generate_videoGenerate a video from a text prompt. The async job saves the finished video to disk and returns its absolute path, or a polling URL if generation takes longer.
Instructions
Generate a video from a text prompt (async job: starts generation, then waits and polls). Video generation typically takes 1-5 minutes. The finished file is saved to disk and its absolute path is returned. If waiting times out, a polling_url is returned — pass it to check_video_status later instead of starting a new (billed) job.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Video model slug, e.g. 'google/veo-3.1' or 'openai/sora-2-pro'. Omit to use the configured default. | |
| prompt | Yes | Detailed description of the desired result. Be specific about subject, style, lighting, composition. | |
| output_dir | No | Directory to save into (absolute, or ~ for home). Defaults to the configured output directory. | |
| resolution | No | Output resolution (model-dependent). | |
| aspect_ratio | No | Desired aspect ratio. Support varies by model; treated as a strong hint. | |
| wait_seconds | No | How long to wait for completion before returning a resumable polling_url. | |
| generate_audio | No | Whether the clip should include generated audio. | |
| filename_prefix | No | Short label used in the saved filename, e.g. 'hero-banner'. Sanitized to letters, digits, dashes. | |
| duration_seconds | No | Clip length in seconds (model-dependent). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Absolute path of the saved video, when completed | |
| status | Yes | completed | pending | in_progress | timeout | failed | error | |
| message | No | ||
| video_id | No | ||
| polling_url | No | Pass to check_video_status to resume waiting |