generate_video
Generate videos from text prompts, images, or extend existing clips using Veo models. Returns an operation ID for asynchronous polling.
Instructions
Start video generation using Google's Veo models. Returns an operationId immediately. Video generation typically takes 1-3 minutes. Use check_video with the operationId to poll for completion and download results. Recommended polling interval: 30 seconds. Supports text-to-video, image-to-video (with imagePath), interpolation (imagePath + lastFramePath), reference images (referenceImagePaths, max 3, Veo 3.1 only), and Veo video extension (videoPath). Image source file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp). videoPath must be MP4 (.mp4) from a previous Veo 720p generation. Audio file references are not supported; describe dialogue, SFX, and ambience in the prompt instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Random seed for reproducibility | |
| model | No | Video model (default: veo-3.1-fast-generate-preview) | |
| prompt | Yes | Video generation prompt. Include dialogue, SFX, and ambience as text audio cues; audio reference files are not accepted. | |
| imagePath | No | Local file path of input image for image-to-video generation. Supported file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp) | |
| videoPath | No | Local file path of a Veo-generated 720p input video to extend. Supported file types: MP4 (.mp4) from a previous Veo 720p generation | |
| resizeMode | No | How the input image is fit to the target aspect ratio for image-to-video (Vertex AI only; requires imagePath): 'crop' or 'pad' (default pad) | |
| resolution | No | Video resolution (1080p/4k requires 8s duration, default: 720p) | |
| aspectRatio | No | Aspect ratio (default: 16:9) | |
| enhancePrompt | No | Use Veo prompt rewriting/enhancement | |
| generateAudio | No | Not configurable in Gemini Developer API mode; Veo 3.1 audio is always on | |
| lastFramePath | No | Local file path of last frame image for interpolation (requires imagePath). Supported file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp) | |
| negativePrompt | No | Text describing what to exclude from the video | |
| numberOfVideos | No | Number of videos to generate (default: 1, max: 1) | |
| durationSeconds | No | Video duration in seconds (default: 8) | |
| personGeneration | No | Optional person generation control | |
| compressionQuality | No | Output video compression quality (Vertex AI only): 'optimized' (smaller file, default) or 'lossless' (larger, highest quality) | |
| referenceImagePaths | No | Local file paths of reference images for style/asset guidance (max 3, Veo 3.1 only). Supported file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp) |