Class GenerateVideosConfig.Builder

java.lang.Object
com.google.genai.types.GenerateVideosConfig.Builder
Enclosing class:
GenerateVideosConfig

public abstract static class GenerateVideosConfig.Builder extends Object
Builder for GenerateVideosConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • httpOptions

      public abstract GenerateVideosConfig.Builder httpOptions(HttpOptions httpOptions)
      Setter for httpOptions.

      httpOptions: Used to override HTTP request options.

    • httpOptions

      public GenerateVideosConfig.Builder httpOptions(HttpOptions.Builder httpOptionsBuilder)
      Setter for httpOptions builder.

      httpOptions: Used to override HTTP request options.

    • numberOfVideos

      public abstract GenerateVideosConfig.Builder numberOfVideos(Integer numberOfVideos)
      Setter for numberOfVideos.

      numberOfVideos: Number of output videos.

    • outputGcsUri

      public abstract GenerateVideosConfig.Builder outputGcsUri(String outputGcsUri)
      Setter for outputGcsUri.

      outputGcsUri: The gcs bucket where to save the generated videos.

    • fps

      public abstract GenerateVideosConfig.Builder fps(Integer fps)
      Setter for fps.

      fps: Frames per second for video generation.

    • durationSeconds

      public abstract GenerateVideosConfig.Builder durationSeconds(Integer durationSeconds)
      Setter for durationSeconds.

      durationSeconds: Duration of the clip for video generation in seconds.

    • seed

      public abstract GenerateVideosConfig.Builder seed(Integer seed)
      Setter for seed.

      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

      public abstract GenerateVideosConfig.Builder aspectRatio(String aspectRatio)
      Setter for aspectRatio.

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

    • resolution

      public abstract GenerateVideosConfig.Builder resolution(String resolution)
      Setter for resolution.

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

    • personGeneration

      public abstract GenerateVideosConfig.Builder personGeneration(String personGeneration)
      Setter for personGeneration.

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

    • pubsubTopic

      public abstract GenerateVideosConfig.Builder pubsubTopic(String pubsubTopic)
      Setter for pubsubTopic.

      pubsubTopic: The pubsub topic where to publish the video generation progress.

    • negativePrompt

      public abstract GenerateVideosConfig.Builder negativePrompt(String negativePrompt)
      Setter for negativePrompt.

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

    • enhancePrompt

      public abstract GenerateVideosConfig.Builder enhancePrompt(boolean enhancePrompt)
      Setter for enhancePrompt.

      enhancePrompt: Whether to use the prompt rewriting logic.

    • generateAudio

      public abstract GenerateVideosConfig.Builder generateAudio(boolean generateAudio)
      Setter for generateAudio.

      generateAudio: Whether to generate audio along with the video.

    • lastFrame

      public abstract GenerateVideosConfig.Builder lastFrame(Image lastFrame)
      Setter for lastFrame.

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

    • lastFrame

      public GenerateVideosConfig.Builder lastFrame(Image.Builder lastFrameBuilder)
      Setter for lastFrame builder.

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

    • referenceImages

      public abstract GenerateVideosConfig.Builder referenceImages(List<VideoGenerationReferenceImage> referenceImages)
      Setter for referenceImages.

      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.

    • referenceImages

      public GenerateVideosConfig.Builder referenceImages(VideoGenerationReferenceImage... referenceImages)
      Setter for referenceImages.

      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.

    • referenceImages

      public GenerateVideosConfig.Builder referenceImages(VideoGenerationReferenceImage.Builder... referenceImagesBuilders)
      Setter for referenceImages builder.

      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

      Setter for mask.

      mask: The mask to use for generating videos.

    • mask

      Setter for mask builder.

      mask: The mask to use for generating videos.

    • compressionQuality

      public abstract GenerateVideosConfig.Builder compressionQuality(VideoCompressionQuality compressionQuality)
      Setter for compressionQuality.

      compressionQuality: Compression quality of the generated videos.

    • compressionQuality

      @CanIgnoreReturnValue public GenerateVideosConfig.Builder compressionQuality(VideoCompressionQuality.Known knownType)
      Setter for compressionQuality given a known enum.

      compressionQuality: Compression quality of the generated videos.

    • compressionQuality

      @CanIgnoreReturnValue public GenerateVideosConfig.Builder compressionQuality(String compressionQuality)
      Setter for compressionQuality given a string.

      compressionQuality: Compression quality of the generated videos.

    • build

      public abstract GenerateVideosConfig build()