Interface GenerateVideosConfig

Configuration for generating videos.

interface GenerateVideosConfig {
    abortSignal?: AbortSignal;
    aspectRatio?: string;
    compressionQuality?: VideoCompressionQuality;
    durationSeconds?: number;
    enhancePrompt?: boolean;
    fps?: number;
    generateAudio?: boolean;
    httpOptions?: HttpOptions;
    lastFrame?: Image;
    negativePrompt?: string;
    numberOfVideos?: number;
    outputGcsUri?: string;
    personGeneration?: string;
    pubsubTopic?: string;
    referenceImages?: VideoGenerationReferenceImage[];
    resolution?: string;
    seed?: number;
}

Properties

abortSignal?: AbortSignal

Abort signal which can be used to cancel the request.

NOTE: AbortSignal is a client-only operation. Using it to cancel an operation will not cancel the request in the service. You will still be charged usage for any applicable operations.

aspectRatio?: string

The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported.

compressionQuality?: VideoCompressionQuality

Compression quality of the generated videos.

durationSeconds?: number

Duration of the clip for video generation in seconds.

enhancePrompt?: boolean

Whether to use the prompt rewriting logic.

fps?: number

Frames per second for video generation.

generateAudio?: boolean

Whether to generate audio along with the video.

httpOptions?: HttpOptions

Used to override HTTP request options.

lastFrame?: Image

Image to use as the last frame of generated videos. Only supported for image to video use cases.

negativePrompt?: string

Explicitly state what should not be included in the generated videos.

numberOfVideos?: number

Number of output videos.

outputGcsUri?: string

The gcs bucket where to save the generated videos.

personGeneration?: string

Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult.

pubsubTopic?: string

The pubsub topic where to publish the video generation progress.

referenceImages?: VideoGenerationReferenceImage[]

The images to use as the references to generate the videos. If this field is provided, the text prompt field must also be provided. The image, video, or last_frame field are not supported. Each image must be associated with a type. Veo 2 supports up to 3 asset images or 1 style image.

resolution?: string

The resolution for the generated video. 720p and 1080p are supported.

seed?: number

The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result.