Class GenerateVideosConfig

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GenerateVideosConfig

public abstract class GenerateVideosConfig extends JsonSerializable
Configuration for generating videos.
  • Constructor Details

    • GenerateVideosConfig

      public GenerateVideosConfig()
  • Method Details

    • httpOptions

      public abstract Optional<HttpOptions> httpOptions()
      Used to override HTTP request options.
    • numberOfVideos

      public abstract Optional<Integer> numberOfVideos()
      Number of output videos.
    • outputGcsUri

      public abstract Optional<String> outputGcsUri()
      The gcs bucket where to save the generated videos.
    • fps

      public abstract Optional<Integer> fps()
      Frames per second for video generation.
    • durationSeconds

      public abstract Optional<Integer> durationSeconds()
      Duration of the clip for video generation in seconds.
    • seed

      public 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

      public abstract Optional<String> aspectRatio()
      The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported.
    • resolution

      public abstract Optional<String> resolution()
      The resolution for the generated video. 720p and 1080p are supported.
    • personGeneration

      public abstract Optional<String> personGeneration()
      Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult.
    • pubsubTopic

      public abstract Optional<String> pubsubTopic()
      The pubsub topic where to publish the video generation progress.
    • negativePrompt

      public abstract Optional<String> negativePrompt()
      Explicitly state what should not be included in the generated videos.
    • enhancePrompt

      public abstract Optional<Boolean> enhancePrompt()
      Whether to use the prompt rewriting logic.
    • generateAudio

      public abstract Optional<Boolean> generateAudio()
      Whether to generate audio along with the video.
    • lastFrame

      public abstract Optional<Image> lastFrame()
      Image to use as the last frame of generated videos. Only supported for image to video use cases.
    • referenceImages

      public 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

      public abstract Optional<VideoGenerationMask> mask()
      The mask to use for generating videos.
    • compressionQuality

      public abstract Optional<VideoCompressionQuality> compressionQuality()
      Compression quality of the generated videos.
    • builder

      public static GenerateVideosConfig.Builder builder()
      Instantiates a builder for GenerateVideosConfig.
    • toBuilder

      public abstract GenerateVideosConfig.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static GenerateVideosConfig fromJson(String jsonString)
      Deserializes a JSON string to a GenerateVideosConfig object.