gemini-api-cli
Call the Gemini API from the shell with gemini-api. Use for media generation (images, TTS, music, video), file and YouTube…
Use this skill for generative video editing, text-to-video, image- and video-referenced video generation, first-frame-to-video, first-and-last-frame transitions, and video extensions using Gemini Omni 1.2 Flash (gemini-omni-1.2-flash) via the official google-genai SDK. Includes
Claude Code
$ npx -y skills add google-gemini/gemini-skills --skill gemini-omni-flash-api --agent claude-code
Codex
$ npx skills add google-gemini/gemini-skills --skill gemini-omni-flash-api -a codex -y
Cursor
$ npx skills add google-gemini/gemini-skills --skill gemini-omni-flash-api -a cursor -y
Gemini CLI
$ npx skills add google-gemini/gemini-skills --skill gemini-omni-flash-api -a gemini-cli -y
GitHub Copilot
$ npx skills add google-gemini/gemini-skills --skill gemini-omni-flash-api -a github-copilot -y
OpenCode
$ npx skills add google-gemini/gemini-skills --skill gemini-omni-flash-api -a opencode -y
Windsurf
$ npx skills add google-gemini/gemini-skills --skill gemini-omni-flash-api -a windsurf -y
name: gemini-omni-flash-api description: Use this skill for generative video editing, text-to-video, image- and video-referenced video generation, first-frame-to-video, first-and-last-frame transitions, and video extensions using Gemini Omni 1.2 Flash (gemini-omni-1.2-flash) via the official google-genai SDK. Includes workflows for pre-processing/optimizing high-resolution or long source videos with ffmpeg, stripping audio for full sound regeneration, and handling turn-by-turn video editing and parallel execution.
This skill uses the Gemini Omni 1.2 Flash model (`gemini-omni-1.2-flash`) to perform text-to-video generation, image-to-video generation (first-frame and two-frame keyframe transitions), reference-to-video (R2V) generation, video extensions (3s–10s per turn, up to 30s total), and video editing.
> [!WARNING] > **Important Regional Restrictions**: Uploading videos to use for video edits, extensions, or references is **NOT** available in the EEA, Switzerland, the United Kingdom, and some US states. If a video-to-video edit completes quickly with empty outputs (`total_output_tokens: 0` or no video content), it is likely due to this restriction.
1. **Text to video**: Generating videos (`3s`–`15s`, default `10s`) from a text prompt. 2. **First frame to video**: Generating videos (`3s`–`15s`, default `10s`) from a starting image (`--first-frame`). 3. **First and last frame transition**: Generating videos (`3s`–`10s`) interpolating between a starting image and a final image (`--first-frame` and `--last-frame`; note: `--last-frame` must be used with `--first-frame`). 4. **Video extensions**: Extending existing videos by `3` to `10` seconds per turn (`10s` default), up to a cumulative length of `30` seconds (`--extend` or `--previous-interaction-id`). 5. **Video editing and refinement**: Editing existing videos (uploaded source video up to `10` seconds), applying stylistic changes, or performing object addition/removal while keeping everything else consistent. 6. **Reference-to-video (R2V) & image-guided editing/extension**: Guiding new video generation (`3s`–`15s`) with reference images (`--image`, up to 6, including `15s` clips) or reference videos (`--video-reference`, up to 3 for `3s`–`10s` clips and max 1 for `11s`–`15s` clips). **Reference images** (`--image`) also work during **video editing** and **prompt-based video extension**, whereas **only reference videos** (`--video-reference`) are restricted to new video generation.
1. **Analyze request**: Determine the target workflow (text-to-video, first-frame-to-video, two-frame keyframe transition, video extension, video editing, or reference-to-video generation) and inspect any input media assets. 2. **Run SDK scripts**:
3. **Retrieve and process output**: Outputs are saved to the local filesystem (e.g. `media/`). Report back the completed media path to the user.
pip install -U google-genai
export GEMINI_API_KEY="your-api-key"
Use the following Python scripts to upload media with the Files API, prepare input videos with ffmpeg, and generate video outputs using the Interactions API.
1. **[upload_file.py](scripts/upload_file.py)**: Uploads local media (images and videos) to the Files API and polls until `ACTIVE`. If uploading a video larger than 25MB, it prints an informative warning/tip highlighting that Gemini Omni Flash is optimized for editing 10s source videos at 720p/24fps, and recommends pre-processing with `prep_video.py` first to speed up the upload.
./scripts/upload_file.py path/to/image.png
2. **[generate_video.py](scripts/video/generate_video.py)**: Performs end-to-end video generation and downloads the output video. It detects and uploads local media references (images or videos) before calling the Interactions API.
./scripts/video/generate_v
Call the Gemini API from the shell with gemini-api. Use for media generation (images, TTS, music, video), file and YouTube…
Use this skill when writing code that calls the Gemini API for text generation, multi-turn chat, multimodal understanding, image…
Use this skill when building real-time, bidirectional streaming applications with the Gemini Live API, or migrating legacy Live…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.