Class RecontextImageSource

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

public abstract class RecontextImageSource extends JsonSerializable
A set of source input(s) for image recontextualization.
  • Constructor Details

    • RecontextImageSource

      public RecontextImageSource()
  • Method Details

    • prompt

      public abstract Optional<String> prompt()
      A text prompt for guiding the model during image recontextualization. Not supported for Virtual Try-On.
    • personImage

      public abstract Optional<Image> personImage()
      Image of the person or subject who will be wearing the product(s).
    • productImages

      public abstract Optional<List<ProductImage>> productImages()
      A list of product images.
    • builder

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

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

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