Video Overview

AI video generation

Generate Video

Basic

python
from praisonaiagents import VideoAgent

agent = VideoAgent(llm="openai/sora-2")
video = agent.generate("A cat playing with yarn")
print(video.id)

Advanced

python
from praisonaiagents import VideoAgent

agent = VideoAgent(llm="openai/sora-2")

# Generate
video = agent.generate("A sunset timelapse", seconds="8", size="1920x1080")

# Wait and download
completed = agent.wait_for_completion(video.id)
if completed.status == "completed":
    agent.download(video.id, "sunset.mp4")

# List all videos
videos = agent.list()

Providers

Supported models

Only models with a LiteLLM video-generation backend work in VideoAgent.

Diagram

VideoAgent model selection

Yes

No

πŸ“ llm=…

πŸ” LiteLLM
video backend?

🎬 generate

❌ ValueError
+ supported list

Pick a model that is in LiteLLM’s chat/cost catalogue but has no video route (for example xai/grok-imagine-video-) and VideoAgent raises a clear ValueError naming models that do* work.

Known-good defaults:

ModelProviderNotes
openai/sora-2OpenAIDefault when llm= is omitted
gemini/veo-3.1-generate-previewGoogleAlso gemini/veo-3.1-lite-generate-preview
runwayml/gen4_turboRunwayMLImage-to-video

Error you’ll see on an unsupported model

text
ValueError: 'xai/grok-imagine-video-1.5' has no LiteLLM video-generation backend
(it may be listed for chat pricing only). Use a supported video model, e.g.:
openai/sora-2, gemini/veo-3.1-generate-preview, runwayml/gen4_turbo

Switch llm= to a supported model and re-run:

python
from praisonaiagents import VideoAgent

agent = VideoAgent(llm="openai/sora-2")  # instead of xai/grok-imagine-video-1.5
video = agent.generate("A cat playing with yarn")

Migrating from an older model ID?

Desktop app

Prefer a native app? The Desktop Video tab generates an MP4 from a prompt with a built-in model picker (MiniMax, Sora 2, Veo 3.1) β€” no code required.

Troubleshooting

ValueError: '…' has no LiteLLM video-generation backend

The model you passed to llm= is in LiteLLM’s model/cost catalogue but has no video-generation provider config. This is common for xAI Grok Imagine ids (xai/grok-imagine-video-*), which are chat-priced only.

Fix: switch to one of the supported models from the error message:

python
from praisonaiagents import VideoAgent

agent = VideoAgent(llm="openai/sora-2")  # instead of xai/grok-imagine-video-1.5

If LiteLLM later adds a video backend for your preferred provider, VideoAgent picks it up automatically β€” nothing is hardcoded to a denylist.

AuthenticationError

The model’s video backend does exist, but your API key is missing or wrong. This error propagates unchanged β€” VideoAgent never masks it. Set the provider’s env var (e.g. OPENAI_API_KEY, GEMINI_API_KEY, RUNWAYML_API_SECRET) and re-run.

video size is not supported

The working backend rejected a specific request parameter (size, duration, prompt format). This is a bad request to a real video backend β€” not a missing backend β€” so it propagates unchanged. Fix the request, not the model: for example, drop size= to use the provider default.