Class GenerateVideosConfig
-
- All Implemented Interfaces:
public abstract class GenerateVideosConfig extends JsonSerializable
Configuration for generating videos.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGenerateVideosConfig.BuilderBuilder for GenerateVideosConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GenerateVideosConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpOptions>httpOptions()Used to override HTTP request options. abstract Optional<Integer>numberOfVideos()Number of output videos. abstract Optional<String>outputGcsUri()The gcs bucket where to save the generated videos. abstract Optional<Integer>fps()Frames per second for video generation. abstract Optional<Integer>durationSeconds()Duration of the clip for video generation in seconds. abstract Optional<Integer>seed()The RNG seed. abstract Optional<String>aspectRatio()The aspect ratio for the generated video. abstract Optional<String>resolution()The resolution for the generated video. abstract Optional<String>personGeneration()Whether allow to generate person videos, and restrict to specific ages. abstract Optional<String>pubsubTopic()The pubsub topic where to publish the video generation progress. abstract Optional<String>negativePrompt()Explicitly state what should not be included in the generated videos. abstract Optional<Boolean>enhancePrompt()Whether to use the prompt rewriting logic. abstract Optional<Boolean>generateAudio()Whether to generate audio along with the video. abstract Optional<Image>lastFrame()Image to use as the last frame of generated videos. abstract Optional<List<VideoGenerationReferenceImage>>referenceImages()The images to use as the references to generate the videos. abstract Optional<VideoGenerationMask>mask()The mask to use for generating videos. abstract Optional<VideoCompressionQuality>compressionQuality()Compression quality of the generated videos. abstract Optional<Map<String, String>>labels()User specified labels to track billing usage. abstract Optional<WebhookConfig>webhookConfig()Webhook configuration for receiving notifications when the video generation operation completes. static GenerateVideosConfig.Builderbuilder()Instantiates a builder for GenerateVideosConfig. abstract GenerateVideosConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static GenerateVideosConfigfromJson(String jsonString)Deserializes a JSON string to a GenerateVideosConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
httpOptions
abstract Optional<HttpOptions> httpOptions()
Used to override HTTP request options.
-
numberOfVideos
abstract Optional<Integer> numberOfVideos()
Number of output videos.
-
outputGcsUri
abstract Optional<String> outputGcsUri()
The gcs bucket where to save the generated videos.
-
durationSeconds
abstract Optional<Integer> durationSeconds()
Duration of the clip for video generation in seconds.
-
seed
abstract Optional<Integer> 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
abstract Optional<String> aspectRatio()
The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported.
-
resolution
abstract Optional<String> resolution()
The resolution for the generated video. 720p and 1080p are supported.
-
personGeneration
abstract Optional<String> personGeneration()
Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult.
-
pubsubTopic
abstract Optional<String> pubsubTopic()
The pubsub topic where to publish the video generation progress.
-
negativePrompt
abstract Optional<String> negativePrompt()
Explicitly state what should not be included in the generated videos.
-
enhancePrompt
abstract Optional<Boolean> enhancePrompt()
Whether to use the prompt rewriting logic.
-
generateAudio
abstract Optional<Boolean> generateAudio()
Whether to generate audio along with the video.
-
lastFrame
abstract Optional<Image> lastFrame()
Image to use as the last frame of generated videos. Only supported for image to video use cases.
-
referenceImages
abstract Optional<List<VideoGenerationReferenceImage>> 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
abstract Optional<VideoGenerationMask> mask()
The mask to use for generating videos.
-
compressionQuality
abstract Optional<VideoCompressionQuality> compressionQuality()
Compression quality of the generated videos.
-
labels
abstract Optional<Map<String, String>> labels()
User specified labels to track billing usage.
-
webhookConfig
abstract Optional<WebhookConfig> webhookConfig()
Webhook configuration for receiving notifications when the video generation operation completes.
-
builder
static GenerateVideosConfig.Builder builder()
Instantiates a builder for GenerateVideosConfig.
-
toBuilder
abstract GenerateVideosConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GenerateVideosConfig fromJson(String jsonString)
Deserializes a JSON string to a GenerateVideosConfig object.
-
-
-
-