Skip to content

API Reference parrot.models.generation

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

parrot.models.generation

View source

Class VideoGenInput

Structured input for VEO video generation with all supported parameters.

Accepted by video_generation as an alternative to a plain str prompt. When individual kwargs are also passed to video_generation, they override the values from this model.

See: https://ai.google.dev/gemini-api/docs/video

Fields:

Field Type Default Description
prompt str Text description of the desired video.
negative_prompt Optional[str] Text describing what NOT to include in the video.
duration int Duration in seconds. VEO 3.1 accepts 4, 6, or 8; VEO 2.0 accepts 5, 6, or 8. Must be 8 for 1080p/4k resolution, extension, or reference images.
aspect_ratio str Video aspect ratio: '16:9' (default) or '9:16'.
resolution Optional[str] Video resolution: '720p' (default), '1080p', or '4k'. VEO 3.1 only — unsupported by VEO 2.0.
person_generation str Controls person generation. VEO 3.x text-to-video & extension: 'allow_all' only. VEO 3.x image-to-video / interpolation / reference images: 'allow_adult' only. VEO 2.0 text-to-video: 'allow_all', 'allow_adult', or 'dont_allow'; VEO 2.0 image-to-video: 'allow_adult' or 'dont_allow'. Note: EU/UK/CH/MENA regions restrict VEO 3.x to 'allow_adult'.
include_audio bool Whether to keep generated audio in the output. VEO 3.1 generates native audio; set False to strip it from the file.
number_of_videos int Number of videos to generate.
seed Optional[int] Optional seed for reproducibility (VEO 3.x only; does not guarantee determinism).
image_path Optional[str] Path (or URL) of a starting image for image-to-video generation.
last_frame_path Optional[str] Path of the ending frame for interpolation. Must be combined with image_path.
reference_image_paths Optional[List[str]] Up to 3 reference image paths used as style/content guides. VEO 3.1 only. Implies duration=8.
reference_type str Reference image type: 'asset' (content) or 'style'.
extend_video Optional[Any] Video object from a previous Veo generation to extend (VEO 3.1 only). Must be a types.Video from operation.response.generated_videos[n].video.
generate_image_first bool If True, generate a reference image from image_prompt or prompt before video generation.
image_prompt Optional[str] Custom prompt for reference image generation when generate_image_first=True.

Class VideoGenerationPrompt

Input schema for generating video content with VEO models (handler-facing).

Fields:

Field Type Default Description
prompt str The text prompt describing the desired video content.
model Optional[str] Video model id; None uses the registry default for the API surface (e.g. 'gemini-omni-1.1-flash').
aspect_ratio str '16:9' The desired aspect ratio (e.g., '16:9', '9:16').
resolution Optional[str] None Optional video resolution ('720p', '1080p', or '4k'); leave unset for models that reject it.
negative_prompt Optional[str] '' A description of what to avoid in the video.
number_of_videos int 1 The number of videos to generate per request.
duration Optional[int] Duration in seconds. VEO 3.1: 4/6/8; VEO 2.0: 5/6/8.
seed Optional[int] Optional seed for reproducible generation (VEO 3.x only).
include_audio bool Whether to include generated audio (VEO 3.1 generates native audio).

Class VideoResolution

Supported video resolutions for VEO models.

Function validate_aspect_ratio

Validate that aspect ratio is in a supported format.

validate_aspect_ratio(aspect_ratio: str) -> bool

Parameter Type Default Description
aspect_ratio str

Returns: bool

Function validate_resolution

Validate that resolution is supported.

validate_resolution(resolution: str) -> bool

Parameter Type Default Description
resolution str

Returns: bool

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