Skip to content

API Reference parrot.clients.google.reel.omni

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.clients.google.reel.omni

View source

Omni async Interactions clip adapter (FEAT-564, spec module M4).

Calls the public sdk.aio.interactions.create(...) surface directly for exactly one reel scene — never the synchronous, streaming client.interactions.create() pattern GoogleGenAIClient._deep_research_ask uses (client.py:5153), which this adapter must not copy (Implementation Notes: "Do not copy synchronous deep research").

Evidence gate (spec §8 Q3, "Omni URI download authentication is unverified"): the response SHAPE below (Interaction.status/.errors/.output_video -> VideoContent.data/.uri/.mime_type, InteractionStatus's legal values) is verified via OFFLINE SDK source inspection of the installed google-genai package only — no live call was made, and the actual Omni video URI host/authentication contract remains unverified. See this task's Completion Note.

Alias DownloadFailure

Re-exported from parrot.clients.google.reel.errors.DownloadFailure.

Alias FilteredOutputError

Re-exported from parrot.clients.google.reel.errors.FilteredOutputError.

Alias GeneratedReelClip

Re-exported from parrot.clients.google.reel.clip.GeneratedReelClip.

Alias GoogleGenAIClient

Re-exported from parrot.clients.google.client.GoogleGenAIClient.

Attribute MOVIEPY_AVAILABLE

Alias MediaValidationFailure

Re-exported from parrot.clients.google.reel.errors.MediaValidationFailure.

Class OmniClipAdapter

Generates one clip through the Gemini Omni Interactions API for a reel scene.

Parameter Type Default Description
owner 'GoogleGenAIClient' The :class:GoogleGenAIClient that owns provider client lifecycle (get_client/close).
downloader ProviderMediaDownloader A :class:ProviderMediaDownloader used when the provider delivers output as a URI rather than inline data.
max_download_bytes int _DEFAULT_MAX_DOWNLOAD_BYTES Byte bound applied to a URI-delivered download.

Method OmniClipAdapter.generate

Generates one Omni clip for a scene.

generate(*, profile: VideoModelProfile, prompt: str, output_directory: Path, aspect_ratio: str, resolution: str, target_duration_seconds: float, starting_frame: Optional[Path], deadline: float) -> GeneratedReelClip

Parameter Type Default Description
profile VideoModelProfile The resolved, enabled Omni profile to generate with.
prompt str The scene's video prompt.
output_directory Path Directory the materialized clip is written into.
aspect_ratio str Requested aspect ratio, forwarded as-is to response_format.aspect_ratio.
resolution str Not applicable to Omni; accepted only for signature parity with :class:VeoClipAdapter.
target_duration_seconds float The scene's edit target duration, used only for the post-measurement insufficient-duration check — never sent to the provider (Omni has no verified duration enum; see spec §3 M4 "Does NOT invent a duration enum").
starting_frame Optional[Path] Must be None — Omni has no verified starting-frame/image-to-video capability (profile supports_starting_frame=False).
deadline float Absolute time.monotonic()-comparable deadline.

Returns: GeneratedReelClip — The generated, measured, locally-saved clip.

Raises:

  • ReelError — Unsupported starting frame, submission failure, terminal interaction status, empty/invalid output, download or media-validation failure — creation failures are never retried (ambiguous outcome).
  • asyncio.CancelledError — Propagated unchanged.

Method OmniClipAdapter.generate_many

Generate number_of_videos distinct Omni videos for one prompt.

The Interactions VideoResponseFormat exposes no output-count parameter, and Interaction.output_video carries a single clip, so N distinct videos are obtained with N independent requests (each sharing the caller's deadline) rather than by re-reading one response.

generate_many(*, profile: VideoModelProfile, prompt: str, output_directory: Path, aspect_ratio: str, number_of_videos: int, deadline: float) -> List[GeneratedReelClip]

Parameter Type Default Description
profile VideoModelProfile
prompt str
output_directory Path
aspect_ratio str
number_of_videos int
deadline float

Returns: List[GeneratedReelClip]

Raises:

  • ReelValidationError — unsupported_option when number_of_videos exceeds profile.max_outputs_per_request.
  • ReelError — same submission/timeout/download semantics as :meth:generate.

Alias OperationFailure

Re-exported from parrot.clients.google.reel.errors.OperationFailure.

Alias ProviderMediaDownloader

Re-exported from parrot.clients.google.reel.download.ProviderMediaDownloader.

Alias ReelError

Re-exported from parrot.clients.google.reel.errors.ReelError.

Alias ReelErrorCode

Re-exported from parrot.clients.google.reel.errors.ReelErrorCode.

Alias ReelValidationError

Re-exported from parrot.clients.google.reel.errors.ReelValidationError.

Alias VideoModelProfile

Re-exported from parrot.clients.google.reel.profiles.VideoModelProfile.

Alias classify_provider_error

Re-exported from parrot.clients.google.reel.errors.classify_provider_error.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally