Skip to content

API Reference parrot.models.google

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

parrot.models.google

View source

Google Related Models to be used in GenAI.

Attribute ALL_VOICE_PROFILES

Type: List[VoiceProfile]

Class AspectRatio

Supported aspect ratios for Gemini Image Generation.

Attribute AudioMode

Class ConversationalScriptConfig

Configuration for generating a conversational script with fictional characters.

Fields:

Field Type Default Description
report_text str The main text content of the script.
speakers List[FictionalSpeaker] A list of fictional speakers to include in the script.
context str Background context for the conversation, e.g., 'Discussing recent scientific discoveries'.
length int Desired length of the script in words.
system_prompt Optional[str] An optional system prompt to guide the AI's behavior during script generation.
system_instruction Optional[str] An optional system instruction to provide additional context or constraints for the script generation.

Class FictionalSpeaker

Configuration for a fictional character in the generated script.

Fields:

Field Type Default Description
name str The name of the fictional speaker (e.g., 'Alex', 'Dr. Evans').
characteristic str A descriptive personality trait for the voice model, e.g., 'charismatic and engaging', 'skeptical and cautious', 'bored'.
role Literal['interviewer', 'interviewee'] The role of the speaker in the conversation.
gender Literal['female', 'male', 'neutral'] 'neutral' The gender of the speaker.

Attribute Gender

Class GoogleVoiceModel

Available models for Gemini Live API.

Native Audio models support bidirectional voice streaming. See: https://ai.google.dev/gemini-api/docs/live

Method GoogleVoiceModel.all_models

Get all available model strings.

all_models() -> List[str]

Returns: List[str]

Class ImageResolution

Supported resolutions for Gemini Image Generation. NOTE: Not all models enforce this, purely advisory/typed.

Class LyriaModel

Available Lyria models for music generation.

Class MusicBatchRequest

Request payload for Lyria batch music generation (Vertex AI).

Fields:

Field Type Default Description
prompt str Text description of the desired music in US English.
negative_prompt Optional[str] Elements to exclude from generation (e.g., 'drums, vocals').
seed Optional[int] Deterministic seed for reproducible output.
sample_count int Number of audio samples to generate (1-4).

Class MusicBatchResponse

Response from Lyria batch API.

Fields:

Field Type Default Description
audio_content str Base64-encoded WAV audio
mime_type str 'audio/wav'

Class MusicGenerationRequest

Request payload for Lyria music generation.

Fields:

Field Type Default Description
prompt str Text description of the desired music.
genre Optional[MusicGenre] Music genre.
mood Optional[MusicMood] Music mood.
bpm int Beats per minute (60-200).
temperature float Creativity (0.0-3.0).
density float Note density (0.0-1.0).
brightness float Tonal brightness (0.0-1.0).
timeout int Max generation duration in seconds.

Class MusicGenre

Music Genres supported by Lyria.

Class MusicMood

Music Moods/Descriptions supported by Lyria.

Attribute MusicPolicy

Attribute PartialFailurePolicy

Class ReelArtifact

Delivered artifact descriptor for a completed video reel.

Fields:

Field Type Default Description
artifact_id str Opaque identifier used by the artifact delivery route.
storage_backend Literal['fs', 'temp', 's3', 'gcs'] Storage backend the artifact bytes live on.
storage_key str Backend-relative key/path used to resolve the artifact.
mime_type str MIME type of the final artifact.
size_bytes int Size of the artifact in bytes.
download_url Optional[str] Signed or direct download URL. Always a string, never a Path; query strings are preserved exactly as issued.
expires_at Optional[datetime] Expiry timestamp for download_url, if any.

Class ReelResult

Typed result of a video reel generation job, stored as AIMessage.metadata['video_reel'].

Fields:

Field Type Default Description
final_artifact Optional[ReelArtifact] Delivered artifact, if the job produced one.
requested_models Dict[str, Optional[str]] Requested director/image/video models, as given on the request.
effective_models Dict[str, Optional[str]] Resolved director/image/video models actually used for generation.
director_unused bool True when scenes were supplied and the director model was never invoked.
api_surface str API surface used for generation (e.g. 'gemini_developer', 'vertex').
sdk_version str google-genai SDK version used for generation.
audio_mode AudioMode Audio mode used for this job.
music_status Literal['off', 'succeeded', 'unavailable', 'timeout', 'failed', 'skipped'] Outcome of background music generation.
scenes List[ReelSceneResult] Per-scene results, original order.
partial bool True when partial_failure_policy='skip' dropped at least one scene.
warnings List[str] Non-fatal warnings, including deprecation notices.
final_duration_seconds Optional[float] Final assembled reel duration in seconds.

Class ReelSceneResult

Per-scene outcome of reel generation.

Fields:

Field Type Default Description
index int Original scene index; preserved even when the scene is skipped.
video_model str Resolved video model actually used for this scene.
backend Literal['veo', 'omni'] Backend adapter used to generate this scene's clip.
status Literal['succeeded', 'failed', 'skipped'] Outcome of this scene.
requested_duration_seconds float Edit target duration requested for this scene.
submitted_duration_seconds Optional[float] Covering duration actually submitted to the provider.
measured_duration_seconds Optional[float] Duration measured from the generated media.
final_duration_seconds Optional[float] Duration retained for this scene in the assembled timeline.
provider_operation_id Optional[str] Provider operation id, kept for reconciliation after ambiguous timeouts.
error_code Optional[str] Stable ReelErrorCode value, if this scene failed.
error_message Optional[str] Redacted error message; never includes keys or base64 payloads.

Class TTSVoice

Google TTS voices.

Class VideoReelRequest

Request configuration for generating a complete video reel.

Fields:

Field Type Default Description
prompt str High-level description of the desired video reel.
scenes Optional[List[VideoReelScene]] List of scenes. If not provided, they will be generated from the prompt.
speech Optional[List[str]] List of speech/narration texts, one per scene. If provided, each text will be used as narration for the corresponding scene. If not provided, no narration will be added to the video reel.
director_model Optional[str] Model used to break the prompt down into scenes. None resolves to the default director model ('gemini-3.8-flash').
model Optional[str] Deprecated alias for director_model. Never selects the video model. Must be identical to director_model when both are supplied.
image_model str Model used for both background and foreground image generation.
video_model Optional[str] Reel-level video model. None resolves to the API-surface Veo 3.1 standard default. Overridden per scene by VideoReelScene.video_model.
resolution VideoResolution Target output resolution for the reel.
audio_mode AudioMode Audio strategy: 'separate', 'native' (model sound) or 'muted'.
music_policy MusicPolicy Background music policy: 'off', 'optional' (best-effort) or 'required'.
partial_failure_policy PartialFailurePolicy Whether a single failed scene fails the job ('fail') or is skipped ('skip').
music_prompt Optional[str] Description for the background music.
music_genre Optional[MusicGenre] Genre of the background music.
music_mood Optional[MusicMood] Mood of the background music.
aspect_ratio AspectRatio Aspect ratio for the generated reel.
transition_type Literal['cut', 'crossfade'] Type of transition between scenes.
output_format Literal['mp4', 'webm'] Output video format.
reference_images Optional[List[Optional[str]]] Sparse, order-preserving image slots, one per scene index. Populated by VideoReelHandler from multipart uploads (image_ parts or ordered slots). A null entry means no image was supplied for that slot; indices are preserved losslessly whether scenes are caller-supplied or director-produced. Image i is assigned to scene i.
storage_backend Literal['fs', 'temp', 's3', 'gcs'] Storage backend for generated artifacts. 'fs' for local filesystem, 'temp' for temporary directory, 's3' for AWS S3, 'gcs' for Google Cloud Storage.
storage_config Optional[Dict[str, Any]] Backend-specific configuration (e.g. bucket name, prefix). Required for 's3' and 'gcs' backends.

Method VideoReelRequest.effective_director_model

Return the director model actually used: director_model, or its default.

effective_director_model() -> str

Returns: str

Method VideoReelRequest.deprecation_warnings

Return warnings collected during validation (e.g. use of the legacy model alias).

deprecation_warnings() -> List[str]

Returns: List[str]

Method VideoReelRequest.image_for_scene

Return the sparse-preserving reference image path for scene index, if any.

Indexes into the flat reference_images slot list rather than scenes, so it works uniformly for caller-supplied scenes and scenes produced later by the director.

image_for_scene(index: int) -> Optional[str]

Parameter Type Default Description
index int

Returns: Optional[str]

Class VideoReelScene

Configuration for a single scene in a video reel.

Fields:

Field Type Default Description
background_prompt str Prompt for the background image generation.
foreground_prompt Optional[str] Optional prompt for a foreground image (e.g., chart, KPI) to be overlayed.
video_prompt str Prompt for the video generation model (Veo).
narration_text Optional[str] Text for the narrator to read for this scene.
duration float Estimated duration of the scene in seconds.
video_model Optional[str] Scene video model override. None inherits the reel's video_model, which in turn inherits the API-surface default when it is also None.
reference_image Optional[str] Path to a reference image for background generation. When provided, passed to generate_image(reference_images=[...]) to guide the background visual style.

Attribute VideoResolution

Class VoiceProfile

Represents a single pre-built generative voice, mapping its name to its known characteristics and gender.

Fields:

Field Type Default Description
voice_name str The official name of the voice (e.g., 'Erinome').
characteristic str The primary characteristic of the voice (e.g., 'Clear', 'Upbeat').
gender Gender The perceived gender of the voice.

Class VoiceRegistry

A comprehensive registry for managing and querying available voice profiles.

Parameter Type Default Description
profiles List[VoiceProfile]

Method VoiceRegistry.find_voice_by_name

Finds a voice profile by its name (case-insensitive).

Returns: A VoiceProfile object if found, otherwise None.

find_voice_by_name(name: str) -> Optional[VoiceProfile]

Parameter Type Default Description
name str The name of the voice to find (e.g., 'Erinome', 'puck').

Returns: Optional[VoiceProfile]

Method VoiceRegistry.get_all_voices

Returns a list of all voice profiles in the registry.

get_all_voices() -> List[VoiceProfile]

Returns: List[VoiceProfile]

Method VoiceRegistry.get_voices_by_gender

Filters and returns all voices matching the specified gender.

Returns: A list of matching VoiceProfile objects.

get_voices_by_gender(gender: Gender) -> List[VoiceProfile]

Parameter Type Default Description
gender Gender The gender to filter by ('female', 'male', or 'neutral').

Returns: List[VoiceProfile]

Method VoiceRegistry.get_voices_by_characteristic

Filters and returns all voices with a specific characteristic (case-insensitive).

Returns: A list of matching VoiceProfile objects.

get_voices_by_characteristic(characteristic: str) -> List[VoiceProfile]

Parameter Type Default Description
characteristic str The characteristic to search for (e.g., 'Clear', 'upbeat').

Returns: List[VoiceProfile]

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