Video Agent • AI Agent SDK
VideoAgent: A specialized agent for generating videos using AI models.
VideoAgent
Defined in the Video Agent module.
AI Agent
A specialized agent for generating videos using AI models.
This agent provides a simple, agent-centric interface for video generation with support for multiple providers (OpenAI Sora, Azure, Gemini Veo, Vertex AI, RunwayML).
Supported Providers: – OpenAI: openai/sora-2, openai/sora-2-pro – Azure: azure/sora-2, azure/sora-2-pro – Gemini Veo 3.1 (paid API, uses GOOGLE_API_KEY / GEMINI_API_KEY): – gemini/veo-3.1-generate-preview # Standard / cinematic quality – gemini/veo-3.1-fast-generate-preview # Fast – gemini/veo-3.1-lite-generate-preview # Lite (cheapest iteration) – Vertex AI Veo 3.1 (uses GOOGLE_APPLICATION_CREDENTIALS or VERTEXAI_PROJECT/VERTEXAI_LOCATION): – vertex_ai/veo-3.1-generate-001 # GA Standard – vertex_ai/veo-3.1-fast-generate-001 # GA Fast – vertex_ai/veo-3.1-lite-generate-001 # Lite – RunwayML: runwayml/gen4_turbo (requires input_reference) – OpenRouter (uses OPENROUTER_API_KEY, requires the openrouter/ prefix): – openrouter/google/veo-3.1, openrouter/kling/kling-3.0-std, openrouter/minimax/hailuo-3, openrouter/bytedance/seedance-2.0, … – Discover exact model ids via GET https://openrouter.ai/api/v1/videos/models – OpenRouter body fields (duration, resolution, aspect_ratio, generate_audio, seed, …) are passed straight through as kwargs to generate(); e.g. agent.generate(prompt, duration=6, resolution=”720p”). – HTTP-Referer / X-Title attribution headers are added automatically (override via OPENROUTER_REFERER / OPENROUTER_APP_TITLE env vars).
Deprecated (do NOT recommend; kept working only if LiteLLM still routes them): – gemini/veo-2.0-generate-001 (Gemini API shutdown 30 Jun 2026) – gemini/veo-3.0-generate-preview, gemini/veo-3.0-fast-generate-preview – vertex_ai/veo-3.0-* (migrate to the veo-3.1 IDs above)
Note on pricing: Gemini/Vertex Veo bill in USD per generated second via the paid API (charged only on success) and are a different meter from Flow UI credits — a Flow subscription cannot pay for API generations. See praison.ai/docs/video/gemini.
Constructor
Optional[str]No description available.
Optional[str]No description available.
OptionalNo description available.
OptionalNo description available.
Optional[str]No description available.
Optional[str]No description available.
Optional[str]No description available.
OptionalNo description available.
Union[bool, int]No description available.
Optional[str]No description available.
Methods
Lazily initialize Rich Console.
video_module()Lazy load litellm.videos module when needed.
generate()Generate a video from a text prompt.
agenerate()Async version of generate().
status()Check the status of a video generation.
astatus()Async version of status().
content()Download the video content.
acontent()Async version of content().
list()List all videos for the current account.
alist()Async version of list().
remix()Remix/edit an existing video.
aremix()Async version of remix().
wait_for_completion()Wait for video generation to complete.
await_completion()Async version of wait_for_completion().
start()Generate video with optional wait and file output.
astart()Async version of start().
run()Generate video silently (production use).
arun()Async version of run().
download()Download a video to a file.
adownload()Async version of download().
Usage
from praisonaiagents import VideoAgent
# Simple usage
agent = VideoAgent(llm="openai/sora-2")
video = agent.generate(prompt="A cat playing with yarn")
# Wait for completion
video = agent.start(
prompt="A serene lake at sunset",
wait=True, # Wait for completion
output="video.mp4" # Save to file
)
# With config
agent = VideoAgent(
llm="gemini/veo-3.1-generate-preview",
video=VideoConfig(seconds="8", size="1280x720")
)Source
View on GitHubpraisonaiagents/agent/video_agent.py at line 86