Skip to main content

Omni Video Python SDK — generate video and image content with the Gemini Omni Video series of models.

Project description

Omni Video Python SDK

Python client for Omni Video — generate video and image content with the Gemini Omni Video series of models from one tiny client.

Omni Video is a hosted multimodal generation platform that wraps the Gemini Omni Video family (seedance-2 for text/image → video, gpt-image-2 and nano-banana-2 for text/image → image) behind one REST API.

Install

pip install omnivideo-sdk

Get an API key

Sign in at https://omnivideo.net/, open the account page, and create a sk-… token. Then export it:

export OMNIVIDEO_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Quick start

from omnivideo_sdk import OmniVideo

client = OmniVideo()  # reads OMNIVIDEO_API_KEY

# One-shot: create and wait for the result
task = client.run(
    model_id="seedance-2",
    prompt="a serene zen garden at sunrise, ultra detailed",
    aspect_ratio="16:9",
)
print(task.output_url)  # video_url or image_url

Lower level: create + poll yourself

from omnivideo_sdk import OmniVideo, TaskStatus

client = OmniVideo(api_key="sk-...")

task = client.create_task(
    model_id="gpt-image-2",
    prompt="cyberpunk corgi, neon rim light",
    image_urls=[],
    aspect_ratio="1:1",
)
print(task.task_id)

while not task.done:
    task = client.get_task(task.task_id)

assert task.task_status == TaskStatus.SUCCESS
print(task.image_url)

Supported models

model_id Modality Output
seedance-2 text/image → video video_url
gpt-image-2 text/image → image image_url
nano-banana-2 text/image → image image_url

See the live model list and pricing on the Omni Video website.

API surface

  • OmniVideo(api_key=None, base_url=..., timeout=60.0)
  • client.create_task(model_id, prompt, image_urls=None, aspect_ratio=None, **extra) -> Task
  • client.get_task(task_id) -> Task
  • client.run(model_id, prompt, ..., poll_interval=3.0, max_wait=600.0) -> Task
  • Task fields: task_id, task_status (1=queued, 2=running, 3=success, 4=failed), image_url, video_url, credits, output_url, done.

Errors are raised as OmniVideoError.

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omnivideo_sdk-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omnivideo_sdk-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file omnivideo_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: omnivideo_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for omnivideo_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd7962a657f34dab47dab99e573b2936737f7190b726f336e627d7cd418a0573
MD5 8caaa10ae447db43a15689614e5541c6
BLAKE2b-256 7cc6af28364150e36455a7d336e9b977a45fca24eac5705d19a5b33ec328c968

See more details on using hashes here.

File details

Details for the file omnivideo_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: omnivideo_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for omnivideo_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 766c04d4eb5f3531618edbc478a5ec760df5eb12038ed336cae7fe6d7d948012
MD5 c81b6c50071ce1f71901ec43a9bd7bfb
BLAKE2b-256 fa19ce69a0c9b79752c67e85d5214454bf924b8b1bf221379fa08ba82571f45a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page