generate_video
Create or edit MP4 videos from text, images, or existing clips with Gemini Omni Flash, including extend and reference-based generation.
Instructions
Generate or edit MP4 videos with Gemini Omni Flash (gemini-omni-1.1-flash).
Capabilities:
text_to_video: prompt-only video with generated audio.
image_to_video: one reference image plus motion and camera direction.
reference_to_video: multiple reference images for subjects, style, or props.
edit: use previous_interaction_id or input_video_path to edit existing video.
extend: continue a video from previous_interaction_id or an uploaded MP4, appending a 3-10 second seamless continuation (repeat up to 40s total).
Parameters:
prompt: Describe the scene, motion, camera movement, lighting, mood, and audio.
task: text_to_video, image_to_video, reference_to_video, edit, or extend. If omitted, inferred. Prefer omitting it for edit and extend: the API rejects an explicit task together with previous_interaction_id, so multi-turn edit/extend are prompt-based (e.g. "Extend this video").
aspect_ratio: 16:9 landscape or 9:16 portrait.
resolution: 360p, 720p (default), 1080p, or 4k. Values above 720p are upscaled.
reference_image_paths: Up to 6 local images. Use , , or tags in the prompt for control.
input_video_path: Local MP4 (10s or less) to upload and edit or extend through the Files API.
delivery: uri is recommended for generated MP4 files; inline is supported for smaller payloads.
previous_interaction_id: Continue editing or extending a prior generated video.
enhance_prompt: Optional, default false. For edits, simple prompts usually work better.
Prompt tips:
By default Omni generates a few different shots with cuts, crafting a narrative from the prompt. Ask for "single continuous shot, no scene cuts" when you want one unbroken scene.
Stage your own cuts with timing language: "Every 2s cut to a new frame", rapid-fire sequences, or timecode lines like [0-3s], [3-6s], [6-10s].
Include explicit audio direction such as "gentle ambient room tone, no dialogue".
For edits, keep prompts simple and say "Keep everything else the same".
When extending, 0s in timecodes refers to the start of the extended part, and you can cut to a new scene with the same characters ("Show the same characters in the next scene").
For first/last-frame interpolation, pass two images and use tags.
Limitations:
Output is MP4, 3-10s clips at 24fps (360p/720p/1080p/4k), SynthID-watermarked.
System instructions, temperature, top_p, stop sequences, negative_prompt, voice edits, YouTube sources, and multi-video reasoning are unsupported.
Uploaded-video editing and extension are unavailable in some regions.
Returns JSON including video.path, interaction_id, task, aspect_ratio, resolution, delivery, size, and URI metadata. After success, open video.path with the native OS video viewer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | ||
| prompt | Yes | ||
| delivery | No | ||
| resolution | No | ||
| aspect_ratio | No | ||
| enhance_prompt | No | ||
| input_video_path | No | ||
| reference_image_paths | No | ||
| previous_interaction_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |