Skip to main content

start

Method
This is a method of the VideoAgent class in the video_agent module.
Generate video with optional wait and file output. Beginner-friendly method that handles the full workflow:
  1. Generate video
  2. Wait for completion (if wait=True)
  3. Download and save to file (if output is specified)

Signature

Parameters

prompt
str
required
Text description of the desired video
wait
bool
default:"True"
If True, wait for completion before returning
output
Optional
Path to save the video file (e.g., “video.mp4”) **kwargs: Additional parameters for generate()

Returns

Returns
Union[Any, bytes]
VideoObject with initial status
  • If wait=True and output: bytes (video content)
  • If wait=True and no output: VideoObject with completed status

Usage

Uses

  • generate
  • wait_for_completion
  • content
  • f.write

Used By

Source

View on GitHub

praisonaiagents/agent/video_agent.py at line 550