Class ControlReferenceImage

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

public abstract class ControlReferenceImage extends JsonSerializable
A control reference image.

The image of the control reference image is either a control image provided by the user, or a regular image which the backend will use to generate a control image of. In the case of the latter, the enable_control_image_computation field in the config should be set to True.

A control image is an image that represents a sketch image of areas for the model to fill in based on the prompt.

  • Constructor Details

    • ControlReferenceImage

      public ControlReferenceImage()
  • Method Details

    • referenceImage

      public abstract Optional<Image> referenceImage()
      The reference image for the editing operation.
    • referenceId

      public abstract Optional<Integer> referenceId()
      The id of the reference image.
    • referenceType

      public abstract Optional<String> referenceType()
      The type of the reference image. Only set by the SDK.
    • config

      public abstract Optional<ControlReferenceConfig> config()
      Configuration for the control reference image.
    • builder

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

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

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