Gemini Omni Python SDK for RunAPI
The Gemini Omni Python SDK is the language-specific package for Gemini Omni on RunAPI. Use this package for voice resources, character resources, and multimodal video generation workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in Python.
Install
pip install runapi-gemini-omni
Quick start
from runapi.gemini_omni import GeminiOmniClient
client = GeminiOmniClient() # reads RUNAPI_API_KEY, or pass api_key="sk-..."
# Reusable voice (returns immediately)
voice = client.create_audio.run(audio_id="kore", name="Narrator")
# Reusable character (returns immediately)
character = client.create_character.run(
descriptions="A friendly robot guide",
reference_image_url="https://cdn.runapi.ai/public/samples/portrait.jpg",
body_reference_image_url="https://cdn.runapi.ai/public/samples/image.jpg",
)
# Text-to-video (create + poll until complete)
result = client.text_to_video.run(
model="gemini-omni-flash-1-1",
prompt="A paper airplane travels from dawn into dusk.",
duration_seconds=6,
first_frame_image_url="https://cdn.runapi.ai/public/samples/first-frame.jpg",
last_frame_image_url="https://cdn.runapi.ai/public/samples/last-frame.jpg",
aspect_ratio="16:9",
output_resolution="360p",
)
print(result.videos[0].url)
character.images returns the portrait first and the optional full-body image second. For Flash 1.1 and the original text-to-video model, a character created with both references consumes two of the seven reference units.
For gemini-omni-flash-1-1, first_frame_image_url cannot be combined with reference images, audio IDs, video clips, or character IDs. last_frame_image_url requires first_frame_image_url.
create_audio returns its result directly. create_character.run returns the
terminal character result and follows an accepted Task when needed.
text_to_video is asynchronous: use create to submit and return quickly,
get to fetch the latest task state, and run to create and poll until
completion.
RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.
Language notes
Pass parameters as keyword arguments and catch the runapi.gemini_omni error classes. The available resources are create_audio, create_character, and text_to_video. Keep RUNAPI_API_KEY in the environment or your secret manager; never commit API keys or callback secrets.
Flash 1.2 generation and continuation
Flash 1.2 uses model=gemini-omni-flash-1-2 and an integer duration_seconds from 3 through 15 for generation. Omit duration_seconds when editing with reference_video_urls; output duration follows the source video. When supplying both first and last frames, generation accepts 3 through 10 seconds. It accepts reference_image_urls with up to 6 images and reference_video_urls with up to 1 video. Images count as one reference slot and a video counts as two, with at most 7 slots total. Up to 2 account-owned character_ids consume no reference slots. Frame inputs cannot accompany reference inputs or characters. aspect_ratio also accepts auto, and seed is an integer from 10000 through 99999.
Continuation uses a completed Flash 1.2 generation or continuation task owned by your account. The source must be at most 15 seconds long at 360p or 720p. duration_seconds adds 3 through 10 seconds, and reference_image_urls accepts up to 3 images. The result contains the full original video plus the added segment. Retrieve its status with the continuation resource's get method.
source = client.text_to_video.run(
model="gemini-omni-flash-1-2", prompt="A paper airplane glides across a studio",
duration_seconds=7, output_resolution="720p",
)
continued = client.extend_video.run(
model="gemini-omni-flash-1-2", source_task_id=source.id,
prompt="Follow the airplane to the window", duration_seconds=3,
)
Links
- Model page: https://runapi.ai/models/gemini-omni
- SDK docs: https://runapi.ai/docs/resources/sdks
- Product docs: https://runapi.ai/docs/api/gemini-omni/text-to-video
- Flash 1.1 pricing and rate limits: https://runapi.ai/models/gemini-omni/flash-1-1
- Flash Preview pricing and rate limits: https://runapi.ai/models/gemini-omni/flash-preview
- Full catalog: https://runapi.ai/models
License
Licensed under the Apache License, Version 2.0.
Metadata
Release files for runapi-gemini-omni 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| runapi_gemini_omni-0.6.1.tar.gz | 6.6 kB | Without provenance | Details for runapi_gemini_omni-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| runapi_gemini_omni-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for runapi_gemini_omni-0.6.1-py3-none-any.whl |
Total release size: 14.9 kB
Release files / runapi_gemini_omni-0.6.1.tar.gz
| Download URL | runapi_gemini_omni-0.6.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc175e3a63be38385db7fcb3ffb0012de8306b36cbbdd61725561b3c44c472ce
|
|
BLAKE2b-256 checksum How to use checksums |
95fd485139b972845fd23b9b86b59ceca9c2af3258e61c84ee2b677d59a6cf2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / runapi_gemini_omni-0.6.1-py3-none-any.whl
| Download URL | runapi_gemini_omni-0.6.1-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e476664b2a8c04b265ded878491fa69377907097e9b4670b80774f21b84f1eba
|
|
BLAKE2b-256 checksum How to use checksums |
f73513305de541479141d8f1e7390f2ae94f3734fb59a44ce8c5e59b4ff3d3bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for runapi-gemini-omni 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.