video_generate
Generate an 8-second MP4 video with native sound from a text prompt via the Gemini API, setting aspect ratio, resolution, and optional first/last frames or reference images.
Instructions
Generate a short video with native sound from a text prompt, with Gemini Omni Flash through the Gemini API, and save it as an .mp4 in GEMINI_PRO_OUTPUT_DIR. One call makes one clip of about 8 seconds; for longer videos chain video_edit, or use flow_make_video on the user's Flow credits when browser tools are enabled.
COSTS MONEY: billed to the API key's Google Cloud project (about $0.10 per second of 720p video, no free tier). Confirm with the user before calling.
Args: prompt: Subject, action, setting, camera and sound, e.g. "A red tram crosses Baku at sunset, slow dolly shot, street noise". English works best; timecodes like "[0-3s] ... [3-6s] ..." sequence the shot. aspect_ratio: "16:9" (landscape, default) or "9:16" (vertical). resolution: "720p" (default), "360p", or upscaled "1080p" or "4k". first_frame: Local image path the video starts from. last_frame: Local image path the video ends on. reference_images: Up to 3 local images of characters or objects to keep. file_name: Optional .mp4 file name; default is the date plus prompt words. wait_seconds: How long to wait for the render (default 300) before returning an id to fetch later with video_check.
Returns: The saved .mp4 path and an id to change or extend it with video_edit; or, if rendering takes longer than wait_seconds, an id for video_check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| file_name | No | ||
| last_frame | No | ||
| resolution | No | 720p | |
| first_frame | No | ||
| aspect_ratio | No | 16:9 | |
| wait_seconds | No | ||
| reference_images | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |