Video Generation
Generate AI videos with Google Labs Veo
Video Generation
Generate AI videos using Google's Veo models through the client.videos API.
Video Generation Types
The SDK supports multiple video generation methods:
| Method | Description |
|---|---|
generateTextToVideo | Generate video from text prompt |
generateImageToVideo | Generate video from image (first frame) |
extend | Extend an existing video |
reshoot | Apply camera control to video |
upsample | Upscale video to HD (1080p) |
generateReferenceImagesVideo | Generate video using reference images |
Text to Video
Generate a video from a text description:
Options
| Option | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Video description |
sessionId | string | Yes | Session identifier |
aspectRatio | AspectRatio | Yes | Video aspect ratio |
videoMode | VideoMode | No | Generation mode |
projectId | string | No | Project ID |
accountTier | AccountTier | No | Account tier |
seed | number | No | Random seed |
sceneId | string | No | Scene identifier |
Image to Video
Generate video from an image (first frame):
First and Last Frame
Generate video with both start and end frames:
Extend Video
Extend an existing video with new content:
Camera Control (Reshoot)
Apply camera movements to an existing video:
Available Motion Types
Camera Control:
RESHOOT_MOTION_TYPE_UPRESHOOT_MOTION_TYPE_DOWNRESHOOT_MOTION_TYPE_LEFT_TO_RIGHTRESHOOT_MOTION_TYPE_RIGHT_TO_LEFTRESHOOT_MOTION_TYPE_FORWARDRESHOOT_MOTION_TYPE_BACKWARDRESHOOT_MOTION_TYPE_DOLLY_IN_ZOOM_OUTRESHOOT_MOTION_TYPE_DOLLY_OUT_ZOOM_IN_LARGE
Stationary Camera:
RESHOOT_MOTION_TYPE_STATIONARY_UPRESHOOT_MOTION_TYPE_STATIONARY_DOWNRESHOOT_MOTION_TYPE_STATIONARY_LEFT_LARGERESHOOT_MOTION_TYPE_STATIONARY_RIGHT_LARGERESHOOT_MOTION_TYPE_STATIONARY_DOLLY_IN_ZOOM_OUTRESHOOT_MOTION_TYPE_STATIONARY_DOLLY_OUT_ZOOM_IN_LARGE
HD Upscaling
Upscale a video to 1080p HD:
Reference Images Video
Generate video using 1-3 reference images:
Check Video Status
Poll for video generation completion:
Status Values
| Status | Description |
|---|---|
MEDIA_GENERATION_STATUS_PENDING | Generation queued |
MEDIA_GENERATION_STATUS_ACTIVE | Generation started |
MEDIA_GENERATION_STATUS_PROCESSING | Generation in progress |
MEDIA_GENERATION_STATUS_SUCCESSFUL | Video ready (success) |
MEDIA_GENERATION_STATUS_COMPLETED | Video ready (alternative) |
MEDIA_GENERATION_STATUS_FAILED | Generation failed |
Polling Example
Video Modes
| Mode | Description |
|---|---|
quality | Higher quality, slower generation |
fast | Lower quality, faster generation |
Note: Pro accounts default to fast mode, Ultra accounts default to quality mode.