Skip to main content

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. A character created with both references consumes two of the seven reference units in a multimodal video request.

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.

License

Licensed under the Apache License, Version 2.0.

Metadata

Release files for runapi-gemini-omni 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runapi-gemini-omni 0.4.0
File Size Uploaded
runapi_gemini_omni-0.4.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for runapi-gemini-omni 0.4.0
File Interpreter ABI Platform
runapi_gemini_omni-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / runapi_gemini_omni-0.4.0.tar.gz

Download URL runapi_gemini_omni-0.4.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4a68aaf47b2c0fd12c9ce0cea94fee53367c9a2781fe5b0e2f25dcd6ab38f0ab
BLAKE2b-256 checksum
How to use checksums
2ef2ae216e6bbc9b31968d1af131f468b34b52b0adf92f51724d535e82b6a0b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Omarchy","version":"4.0.1","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.4.0-py3-none-any.whl

Download URL runapi_gemini_omni-0.4.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbfcc7dc6f4141c67ac9d8de3056b5d9d498c0b033902e7aa68b594513cb2c03
BLAKE2b-256 checksum
How to use checksums
374b81f27c2385e8918caf2e45f1a0e45eb0924b3b48730be880deebe1f1fcfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Omarchy","version":"4.0.1","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page