Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Example Usage

import { VideoGenerationRequest } from "@openrouter/sdk/models";

let value: VideoGenerationRequest = {
  model: "google/veo-3.1",
  prompt: "A serene mountain landscape at sunset",
};

Fields

FieldTypeRequiredDescriptionExample
aspectRatiomodels.AspectRatio:heavy_minus_sign:Aspect ratio of the generated video16:9
callbackUrlstring:heavy_minus_sign:URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.https://example.com/webhook
durationnumber:heavy_minus_sign:Duration of the generated video in seconds8
frameImagesmodels.FrameImage[]:heavy_minus_sign:Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
generateAudioboolean:heavy_minus_sign:Whether to generate audio alongside the video. Defaults to the endpoint’s generate_audio capability flag, false if not set.true
inputReferencesmodels.ContentPartImage[]:heavy_minus_sign:Reference images to guide video generation
modelstring:heavy_check_mark:N/A
promptstring:heavy_check_mark:N/A
providermodels.VideoGenerationRequestProvider:heavy_minus_sign:Provider-specific passthrough configuration
resolutionmodels.Resolution:heavy_minus_sign:Resolution of the generated video720p
seednumber:heavy_minus_sign:If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
sizestring:heavy_minus_sign:Exact pixel dimensions of the generated video in “WIDTHxHEIGHT” format (e.g. “1280x720”). Interchangeable with resolution + aspect_ratio.1280x720