Class ImageResponseFormat

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

public abstract class ImageResponseFormat extends JsonSerializable
Configuration for image-specific output formatting.
  • Constructor Details

    • ImageResponseFormat

      public ImageResponseFormat()
  • Method Details

    • aspectRatio

      public abstract Optional<AspectRatio> aspectRatio()
      Optional. The aspect ratio for the image output.
    • delivery

      public abstract Optional<Delivery> delivery()
      Optional. Delivery mode for the generated content.
    • imageSize

      public abstract Optional<ImageSize> imageSize()
      Optional. The size of the image output.
    • mimeType

      public abstract Optional<String> mimeType()
      Optional. The MIME type of the image output.
    • builder

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

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

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