Class RecontextImageConfig

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

public abstract class RecontextImageConfig extends JsonSerializable
Configuration for recontextualizing an image.
  • Constructor Details

    • RecontextImageConfig

      public RecontextImageConfig()
  • Method Details

    • httpOptions

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

      public abstract Optional<Integer> numberOfImages()
      Number of images to generate.
    • baseSteps

      public abstract Optional<Integer> baseSteps()
      The number of sampling steps. A higher value has better image quality, while a lower value has better latency.
    • outputGcsUri

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

      public abstract Optional<Integer> seed()
      Random seed for image generation.
    • safetyFilterLevel

      public abstract Optional<SafetyFilterLevel> safetyFilterLevel()
      Filter level for safety filtering.
    • personGeneration

      public abstract Optional<PersonGeneration> personGeneration()
      Whether allow to generate person images, and restrict to specific ages.
    • addWatermark

      public abstract Optional<Boolean> addWatermark()
      Whether to add a SynthID watermark to the generated images.
    • outputMimeType

      public abstract Optional<String> outputMimeType()
      MIME type of the generated image.
    • outputCompressionQuality

      public abstract Optional<Integer> outputCompressionQuality()
      Compression quality of the generated image (for ``image/jpeg`` only).
    • enhancePrompt

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

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

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

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