Overview
Generate videos directly in chat using AI models. Users describe what they want and the model produces a short video clip, which is then playable inline.Quick Start
Toggle inchat.config.ts:
Video generation requires
BLOB_READ_WRITE_TOKEN since generated videos are
uploaded to Vercel Blob storage.Parameters
The tool accepts the following inputs:| Parameter | Type | Default | Description |
|---|---|---|---|
prompt | string | — | Descriptive text for the video |
aspectRatio | "16:9" | "9:16" | "1:1" | "16:9" | Output aspect ratio |
durationSeconds | number (1–10) | 5 | Length of the generated video |
Architecture
Follows the Tool Part pattern:Tool Output
UI States
| State | Shows |
|---|---|
input-available | Pulsing placeholder + “Generating video: “ |
output-available | Inline video player with controls, autoplay, loop, and mute |
failed | Error message with suggestion to try a different prompt |
Configuration
Video Model
chat.config.ts
Model Selection Logic
When the tool runs, it resolves the model to use:- If the user’s selected chat model supports video output (per the app model registry,
model.output.video), use it. - Otherwise, fall back to
config.models.defaults.video.
Google Model Handling
For Google (Gemini) models,aspectRatio is passed in provider-specific options rather than as a top-level parameter.