gemini_video_generate
Generate short videos from text, images, or reference images, and edit prior videos using the Gemini omni model. Output is saved as an MP4 file.
Instructions
Generate a short video via the Gemini omni model (preview): text→video, image→video / reference→video (supply reference image[s]), or edit a prior video (task: "edit" + previous_interaction_id / continue_last). Output is written to disk as MP4 (video has no inline MCP block). Video runs long — use async: true to get a job_id immediately and poll gemini_get_result, or raise timeout_ms. Preview model: needs a funded account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | No | text_to_video (default), image_to_video / reference_to_video (need image input), or edit (needs previous_interaction_id) | |
| async | No | Run in the background and return a job_id immediately instead of the image, so a long (Pro/4K) generation cannot hit the host tools/call timeout (-32001). Poll gemini_get_result with the job_id to fetch the result (jobs are per-process and expire ~10 min after completion). | |
| model | No | Model id override (default: gemini-omni-flash-preview) | |
| images | No | Reference image path(s) for image_to_video / reference_to_video | |
| prompt | Yes | Description of the video to generate (or the edit instruction when task=edit) | |
| confirm | No | Must be true to proceed. Without this, the tool returns a preview. | |
| filename | No | Base filename for the output video (extension stripped; default: slugified prompt) | |
| images_url | No | Reference stills as public https URLs — the SERVER downloads them, so no image bytes travel through the conversation. Preferred over images_base64, which costs ~14k tokens per photo and breaks if a file read was truncated. Max 15MB each; must be a directly-linked image (Content-Type image/*). | |
| output_dir | No | Directory to write the video to (default: $GEMINI_OUTPUT_DIR or cwd) | |
| timeout_ms | No | Upstream request timeout in ms for this call (default: $GEMINI_TIMEOUT_MS, else 60000 — or 120000 when image_size is 4K, which routinely runs past 60s) | |
| aspect_ratio | No | Output aspect ratio (omni: 16:9 or 9:16) | |
| continue_last | No | Continue from the most recent video interaction this server created (explicit previous_interaction_id wins) | |
| images_base64 | No | Reference images as base64 strings or data URIs. Last resort: prefer images_url or images_file_uris, which keep image bytes out of the conversation | |
| from_clipboard | No | Use the image currently on the macOS clipboard as a reference | |
| idempotency_key | No | Opaque idempotency key: a repeat call with the same key returns the recorded result (reused: true) instead of billing a new generation. Set it when retrying after a host timeout (-32001) to avoid a duplicate charge. | |
| images_file_uris | No | Reference stills by Gemini Files API reference ("files/<id>", or the full uri) from gemini_upload_file or POST /upload. Upload once, then reference it across as many calls as you like — no bytes are re-sent and none enter the conversation. Files are retained ~48h, after which the reference stops resolving. | |
| previous_interaction_id | No | Interaction id to edit/continue (with task: "edit") |