Skip to main content

Video Generation

OpenClaw agents can generate videos from text prompts, reference images, or existing videos. Twelve provider backends are supported, each with different model options, input modes, and feature sets. The agent picks the right provider automatically based on your configuration and available API keys.
The video_generate tool only appears when at least one video-generation provider is available. If you do not see it in your agent tools, set a provider API key or configure agents.defaults.videoGenerationModel.

Quick start

  1. Set an API key for any supported provider:
export GEMINI_API_KEY="your-key"
  1. Optionally pin a default model:
openclaw config set agents.defaults.videoGenerationModel.primary "google/veo-3.1-fast-generate-preview"
  1. Ask the agent:
Generate a 5-second cinematic video of a friendly lobster surfing at sunset.
The agent calls video_generate automatically. No tool allowlisting is needed.

What happens when you generate a video

Video generation is asynchronous. When the agent calls video_generate in a session:
  1. OpenClaw submits the request to the provider and immediately returns a task ID.
  2. The provider processes the job in the background (typically 30 seconds to 5 minutes depending on the provider and resolution).
  3. When the video is ready, OpenClaw wakes the same session with an internal completion event.
  4. The agent posts the finished video back into the original conversation.
While a job is in flight, duplicate video_generate calls in the same session return the current task status instead of starting another generation. Use openclaw tasks list or openclaw tasks show <taskId> to check progress from the CLI. Outside of session-backed agent runs (for example, direct tool invocations), the tool falls back to inline generation and returns the final media path in the same turn.

Supported providers

ProviderDefault modelTextImage refVideo refAPI key
Alibabawan2.6-t2vYesYes (remote URL)Yes (remote URL)MODELSTUDIO_API_KEY
BytePlusseedance-1-0-lite-t2v-250428Yes1 imageNoBYTEPLUS_API_KEY
ComfyUIworkflowYes1 imageNoCOMFY_API_KEY or COMFY_CLOUD_API_KEY
falfal-ai/minimax/video-01-liveYes1 imageNoFAL_KEY
Googleveo-3.1-fast-generate-previewYes1 image1 videoGEMINI_API_KEY
MiniMaxMiniMax-Hailuo-2.3Yes1 imageNoMINIMAX_API_KEY
OpenAIsora-2Yes1 image1 videoOPENAI_API_KEY
Qwenwan2.6-t2vYesYes (remote URL)Yes (remote URL)QWEN_API_KEY
Runwaygen4.5Yes1 image1 videoRUNWAYML_API_SECRET
TogetherWan-AI/Wan2.2-T2V-A14BYes1 imageNoTOGETHER_API_KEY
Vydraveo3Yes1 image (kling)NoVYDRA_API_KEY
xAIgrok-imagine-videoYes1 image1 videoXAI_API_KEY
Some providers accept additional or alternate API key env vars. See individual provider pages for details. Run video_generate action=list to inspect available providers and models at runtime.

Tool parameters

Required

ParameterTypeDescription
promptstringText description of the video to generate (required for action: "generate")

Content inputs

ParameterTypeDescription
imagestringSingle reference image (path or URL)
imagesstring[]Multiple reference images (up to 5)
videostringSingle reference video (path or URL)
videosstring[]Multiple reference videos (up to 4)

Style controls

ParameterTypeDescription
aspectRatiostring1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
resolutionstring480P, 720P, or 1080P
durationSecondsnumberTarget duration in seconds (rounded to nearest provider-supported value)
sizestringSize hint when the provider supports it
audiobooleanEnable generated audio when supported
watermarkbooleanToggle provider watermarking when supported

Advanced

ParameterTypeDescription
actionstring"generate" (default), "status", or "list"
modelstringProvider/model override (e.g. runway/gen4.5)
filenamestringOutput filename hint
Not all providers support all parameters. Unsupported overrides are ignored on a best-effort basis and reported as warnings in the tool result. Hard capability limits (such as too many reference inputs) fail before submission.

Actions

  • generate (default) — create a video from the given prompt and optional reference inputs.
  • status — check the state of the in-flight video task for the current session without starting another generation.
  • list — show available providers, models, and their capabilities.

Model selection

When generating a video, OpenClaw resolves the model in this order:
  1. model tool parameter — if the agent specifies one in the call.
  2. videoGenerationModel.primary — from config.
  3. videoGenerationModel.fallbacks — tried in order.
  4. Auto-detection — uses providers that have valid auth, starting with the current default provider, then remaining providers in alphabetical order.
If a provider fails, the next candidate is tried automatically. If all candidates fail, the error includes details from each attempt.
{
  agents: {
    defaults: {
      videoGenerationModel: {
        primary: "google/veo-3.1-fast-generate-preview",
        fallbacks: ["runway/gen4.5", "qwen/wan2.6-t2v"],
      },
    },
  },
}

Provider notes

ProviderNotes
AlibabaUses DashScope/Model Studio async endpoint. Reference images and videos must be remote http(s) URLs.
BytePlusSingle image reference only.
ComfyUIWorkflow-driven local or cloud execution. Supports text-to-video and image-to-video through the configured graph.
falUses queue-backed flow for long-running jobs. Single image reference only.
GoogleUses Gemini/Veo. Supports one image or one video reference.
MiniMaxSingle image reference only.
OpenAIOnly size override is forwarded. Other style overrides (aspectRatio, resolution, audio, watermark) are ignored with a warning.
QwenSame DashScope backend as Alibaba. Reference inputs must be remote http(s) URLs; local files are rejected upfront.
RunwaySupports local files via data URIs. Video-to-video requires runway/gen4_aleph. Text-only runs expose 16:9 and 9:16 aspect ratios.
TogetherSingle image reference only.
VydraUses https://www.vydra.ai/api/v1 directly to avoid auth-dropping redirects. veo3 is bundled as text-to-video only; kling requires a remote image URL.
xAISupports text-to-video, image-to-video, and remote video edit/extend flows.

Configuration

Set the default video generation model in your OpenClaw config:
{
  agents: {
    defaults: {
      videoGenerationModel: {
        primary: "qwen/wan2.6-t2v",
        fallbacks: ["qwen/wan2.6-r2v-flash"],
      },
    },
  },
}
Or via the CLI:
openclaw config set agents.defaults.videoGenerationModel.primary "qwen/wan2.6-t2v"