Class UpscaleImageAPIConfig

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

@InternalApi public abstract class UpscaleImageAPIConfig extends JsonSerializable
Internal API config for UpscaleImage.

These fields require default values sent to the API which are not intended to be modifiable or exposed to users in the SDK method.

  • Constructor Details

    • UpscaleImageAPIConfig

      public UpscaleImageAPIConfig()
  • Method Details

    • httpOptions

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

      public abstract Optional<String> outputGcsUri()
      Cloud Storage URI used to store the generated images.
    • includeRaiReason

      public abstract Optional<Boolean> includeRaiReason()
      Whether to include a reason for filtered-out images in the response.
    • outputMimeType

      public abstract Optional<String> outputMimeType()
      The image format that the output should be saved as.
    • outputCompressionQuality

      public abstract Optional<Integer> outputCompressionQuality()
      The level of compression. Only applicable if the ``output_mime_type`` is ``image/jpeg``.
    • enhanceInputImage

      public abstract Optional<Boolean> enhanceInputImage()
      Whether to add an image enhancing step before upscaling. It is expected to suppress the noise and JPEG compression artifacts from the input image.
    • imagePreservationFactor

      public abstract Optional<Float> imagePreservationFactor()
      With a higher image preservation factor, the original image pixels are more respected. With a lower image preservation factor, the output image will have be more different from the input image, but with finer details and less noise.
    • numberOfImages

      public abstract Optional<Integer> numberOfImages()
    • mode

      public abstract Optional<String> mode()
    • builder

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

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

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