generate_omni_video
Generate short videos from text or images, or edit existing videos with natural language instructions, using Gemini Omni Flash. Returns video synchronously without polling.
Instructions
Generate or conversationally edit short videos with Gemini Omni Flash (gemini-omni-flash-preview). This is a NON-Veo model on the Google AI Studio (Gemini API) backend and does NOT use generate_video/check_video: it returns the finished video synchronously in one call (no operationId polling). Two paths: (1) ONESHOT generation — text-to-video, or image/reference-to-video via imagePaths (max 7); (2) INTERACTIVE editing — set previousInteractionId to an id returned by a prior call to edit that video with a natural-language instruction (no image re-upload; chain up to 3 sequential edits). Constraints: 720p output only; aspect ratio 16:9 or 9:16; clips run a few seconds (steer pacing/timing within the prompt — duration is not a parameter); a synced audio track is generated automatically (audio reference inputs are not accepted — describe dialogue/SFX/ambience in the prompt). Image source file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp). The response includes interactionId (pass it back as previousInteractionId to edit) and the saved file path. Videos are saved to /root/Videos/gemini-generated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Omni video model (default: gemini-omni-flash-preview) | |
| prompt | Yes | Video prompt for a new generation (oneshot), or a natural-language edit instruction when previousInteractionId is set (interactive editing). Describe dialogue/SFX/ambience as text; audio reference files are not accepted. | |
| imagePaths | No | Local file paths of source/reference images for image-to-video or reference-to-video (max 7). Supported file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp). Omit for interactive edits — previousInteractionId reuses the prior video. | |
| aspectRatio | No | Aspect ratio (default: 16:9). Omni Flash supports 16:9 and 9:16 only. Output is 720p only. | |
| previousInteractionId | No | Interaction ID from a prior generate_omni_video call. When set, conversationally edits that video (no image re-upload) instead of generating a new one. |