Package com.google.genai.types
Class GenerateVideosConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GenerateVideosConfig
Configuration for generating videos.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder for GenerateVideosConfig. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe aspect ratio for the generated video.static GenerateVideosConfig.Builder
builder()
Instantiates a builder for GenerateVideosConfig.abstract Optional<VideoCompressionQuality>
Compression quality of the generated videos.Duration of the clip for video generation in seconds.Whether to use the prompt rewriting logic.fps()
Frames per second for video generation.static GenerateVideosConfig
Deserializes a JSON string to a GenerateVideosConfig object.Whether to generate audio along with the video.abstract Optional<HttpOptions>
Used to override HTTP request options.Image to use as the last frame of generated videos.abstract Optional<VideoGenerationMask>
mask()
The mask to use for generating videos.Explicitly state what should not be included in the generated videos.Number of output videos.The gcs bucket where to save the generated videos.Whether allow to generate person videos, and restrict to specific ages.The pubsub topic where to publish the video generation progress.abstract Optional<List<VideoGenerationReferenceImage>>
The images to use as the references to generate the videos.The resolution for the generated video.seed()
The RNG seed.abstract GenerateVideosConfig.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
GenerateVideosConfig
public GenerateVideosConfig()
-
-
Method Details
-
httpOptions
Used to override HTTP request options. -
numberOfVideos
Number of output videos. -
outputGcsUri
The gcs bucket where to save the generated videos. -
fps
Frames per second for video generation. -
durationSeconds
Duration of the clip for video generation in seconds. -
seed
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. -
aspectRatio
The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. -
resolution
The resolution for the generated video. 720p and 1080p are supported. -
personGeneration
Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. -
pubsubTopic
The pubsub topic where to publish the video generation progress. -
negativePrompt
Explicitly state what should not be included in the generated videos. -
enhancePrompt
Whether to use the prompt rewriting logic. -
generateAudio
Whether to generate audio along with the video. -
lastFrame
Image to use as the last frame of generated videos. Only supported for image to video use cases. -
referenceImages
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. -
mask
The mask to use for generating videos. -
compressionQuality
Compression quality of the generated videos. -
builder
Instantiates a builder for GenerateVideosConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a GenerateVideosConfig object.
-