Gemini Omni MCP Server
by Anil-matcha
README.md
# Gemini Omni 1.1 Flash API — Python Wrapper
[](https://muapi.ai)
[](LICENSE)
[](https://www.python.org/)
A focused Python SDK and MCP server for [Google Gemini Omni Flash on MuAPI](https://muapi.ai/gemini-omni). It supports text-to-video, image-to-video, video-edit, reusable voice profiles, reusable character profiles, and asynchronous job polling.
Google announced the **Gemini Omni 1.1 Flash** update on August 27, 2026 — adding scene extension (up to 10 seconds of analyzed context, up to 40 seconds cumulative length), first/last frame keyframe control, a 360p draft resolution mode, 4K upscaling, and up to 3 seconds of video reference input. See [muapi.ai/gemini-omni-1.1-flash](https://muapi.ai/gemini-omni-1.1-flash) for details. This client wraps the Gemini Omni Flash endpoints that are live on MuAPI today; the 1.1-specific controls above are rolling out and not yet exposed by this SDK — this README and the code will be updated as MuAPI adds them.
## Related Projects
- [Gemini Omni on MuAPI](https://muapi.ai/gemini-omni) — Model landing page: text-to-video, image-to-video, video-edit, voice profiles, character profiles.
- [Gemini Omni 1.1 Flash on MuAPI](https://muapi.ai/gemini-omni-1.1-flash) — What's new in the 1.1 update and rollout status.
- [gemini-omni-comfyui](https://github.com/Anil-matcha/gemini-omni-comfyui) — ComfyUI custom nodes for Gemini Omni via MuAPI.
- [Awesome-Gemini-Omni-API-Prompts](https://github.com/Anil-matcha/Awesome-Gemini-Omni-API-Prompts) — Curated Gemini Omni prompt library and API guide.
- [awesome-ai-video-models](https://github.com/Anil-matcha/awesome-ai-video-models) — Compare AI video models by API, price, and speed.
- [Wan-3.0-API](https://github.com/Anil-matcha/Wan-3.0-API) — Python SDK for Wan 3.0 video generation via MuAPI.
- [Veo-4-API](https://github.com/Anil-matcha/Veo-4-API) — Python SDK for Google Veo AI video generation.
- [Seedance-2-API](https://github.com/Anil-matcha/Seedance-2-API) — Python SDK for ByteDance Seedance video generation.
- [Generative-Media-Skills](https://github.com/SamurAIGPT/Generative-Media-Skills) — Agent-ready skills for automated media workflows.
- [muapi-cli](https://github.com/SamurAIGPT/muapi-cli) — Command-line access to MuAPI image, video, and audio models.
## Install
```bash
git clone https://github.com/Anil-matcha/Gemini-Omni-1.1-Flash-API.git
cd Gemini-Omni-1.1-Flash-API
pip install -r requirements.txt
cp .env.example .env
```
Set `MUAPI_API_KEY` in `.env`. Set `GEMINI_OMNI_API_BASE_URL` only if you use a compatible provider other than the default MuAPI base URL.
## Quick start
```python
from gemini_omni_api import GeminiOmniAPI
api = GeminiOmniAPI()
job = api.text_to_video(
"A street musician plays a violin on a rainy Paris evening, raindrops tap "
"the cobblestones, a slow melancholic melody, distant café chatter.",
duration=8,
resolution="1080p",
aspect_ratio="16:9",
)
result = api.wait_for_completion(job["request_id"])
print(result)
```
## Image to video
```python
job = api.image_to_video(
prompt="The subject slowly turns to face the camera as golden-hour light sweeps across the scene.",
image_urls=["https://example.com/reference.jpg"],
aspect_ratio="9:16",
duration=8,
)
```
## Video edit
```python
job = api.video_edit(
prompt="Restyle the entire clip as a hand-drawn Studio Ghibli animation, keep the original camera motion.",
video_url="https://example.com/source.mp4",
trim_start=0,
trim_end=10,
resolution="1080p",
)
```
## Voice and character profiles
```python
voice = api.create_audio_profile("Narrator", preset_voice="warm-male-1", style_description="calm, deliberate pacing")
character = api.create_character_profile("Host", image_url="https://example.com/host.jpg")
job = api.text_to_video(
"The host welcomes viewers to the show.",
audio_ids=[voice["audioId"]],
character_ids=[character["characterId"]],
)
```
## API surface
| Method | Purpose |
| --- | --- |
| `text_to_video()` | Generate a video with synchronized audio from a text prompt. |
| `image_to_video()` | Animate 1-7 reference images with a text prompt. |
| `video_edit()` | Restyle, relight, swap subjects, or rewrite dialogue from a source clip. |
| `create_audio_profile()` | Create a reusable voice profile from a preset voice; returns an `audioId`. |
| `create_character_profile()` | Create a reusable character profile from a reference image; returns a `characterId`. |
| `upload_file()` | Upload a local reference file. |
| `get_result()` / `wait_for_completion()` | Retrieve an asynchronous job's output. |
`text_to_video()`, `image_to_video()`, and `video_edit()` accept `duration` (4/6/8/10 seconds), `resolution` (`720p`, `1080p`, `4k`), `aspect_ratio` (`16:9`, `9:16`), up to 3 `audio_ids`, up to 3 `character_ids`, and `seed`.
## MCP server
Expose Gemini Omni tools to MCP-capable clients:
```bash
python mcp_server.py
```
The server provides `text_to_video`, `image_to_video`, `video_edit`, `create_audio_profile`, `create_character_profile`, and `get_task_status` tools.
## Status: 1.1 update rolling out
Google announced Gemini Omni 1.1 Flash on August 27, 2026. It's currently rolling out through Google AI Studio, the Gemini Enterprise Agent Platform, Google Flow, and the Gemini app. MuAPI is rolling out API access for the new 1.1 controls (scene extension, keyframes, 360p draft mode, 4K upscaling, video reference input) — this SDK targets the Gemini Omni Flash endpoints available on MuAPI today and will be updated as the 1.1 endpoints go live.
## Endpoint compatibility
The client uses the `gemini-omni-text-to-video`, `gemini-omni-image-to-video`, `gemini-omni-video-edit`, `gemini-omni-audio`, and `gemini-omni-character` paths beneath `GEMINI_OMNI_API_BASE_URL`. If your provider names its endpoints differently, pass that provider's compatible base URL or adapt the small client module before use.
## License
[MIT](LICENSE)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues