Skip to main content

generate

Method
This is a method of the VideoAgent class in the video_agent module.
Generate a video from a text prompt.

Signature

def generate(prompt: str, seconds: Optional[str], size: Optional[str], input_reference: Optional[Any]) -> Any

Parameters

prompt
str
required
Text description of the desired video
seconds
Optional
Video duration (e.g., “8”, “16”). Defaults to config value.
size
Optional
Video dimensions (e.g., “720x1280”). Defaults to config value.
input_reference
Optional
Reference image for image-to-video generation **kwargs: Additional provider-specific parameters

Returns

Returns
Any
VideoObject with id, status, and metadata

Usage

video = agent.generate(
        prompt="A cat playing with yarn",
        seconds="8",
        size="1280x720"
    )
    print(f"Video ID: {video.id}")
    print(f"Status: {video.status}")