generate_video
Generate a video from a text description using AI. Supports async processing with optional image conditioning for first/last frames or style references.
Instructions
Generate a video from a text prompt using an OpenRouter video-generation model (default: google/veo-3.1). Submits an async job, polls until completion or max_wait_ms, then downloads the result. Optionally conditioned on first/last-frame images or reference images. Large outputs are auto-saved when save_path is provided and path-sandboxed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the desired video. | |
| model | No | Override the video model ID. | |
| resolution | No | 480p / 720p / 1080p / 1K / 2K / 4K (model-dependent). | |
| aspect_ratio | No | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 21:9 / 9:21 (model-dependent). | |
| duration | No | Duration in seconds (model-dependent). | |
| seed | No | Deterministic seed when supported. | |
| first_frame_image | No | Optional image (path, URL, or data URL) used as the first frame for image-to-video. | |
| last_frame_image | No | Optional image used as the last frame for frame transitions. | |
| reference_images | No | Optional style/content reference images. | |
| provider | No | Provider-specific passthrough options keyed by provider slug. | |
| save_path | No | Where to save the video. Routed through the OPENROUTER_OUTPUT_DIR sandbox; extension auto-corrected. | |
| max_wait_ms | No | Total time to wait for the async job before returning a resumable handle (default 600000 ms). | |
| poll_interval_ms | No | Polling cadence (default 15000 ms). |