Class EditImageConfig

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

public abstract class EditImageConfig extends JsonSerializable
Configuration for editing an image.
  • Constructor Details

    • EditImageConfig

      public EditImageConfig()
  • 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.
    • negativePrompt

      public abstract Optional<String> negativePrompt()
      Description of what to discourage in the generated images.
    • numberOfImages

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

      public abstract Optional<String> aspectRatio()
      Aspect ratio of the generated images.
    • guidanceScale

      public abstract Optional<Float> guidanceScale()
      Controls how much the model adheres to the text prompt. Large values increase output and prompt alignment, but may compromise image quality.
    • seed

      public abstract Optional<Integer> seed()
      Random seed for image generation. This is not available when ``add_watermark`` is set to true.
    • safetyFilterLevel

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

      public abstract Optional<PersonGeneration> personGeneration()
      Allows generation of people by the model.
    • includeSafetyAttributes

      public abstract Optional<Boolean> includeSafetyAttributes()
      Whether to report the safety scores of each generated image and the positive prompt in the response.
    • includeRaiReason

      public abstract Optional<Boolean> includeRaiReason()
      Whether to include the Responsible AI filter reason if the image is filtered out of the response.
    • language

      public abstract Optional<ImagePromptLanguage> language()
      Language of the text in the prompt.
    • 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).
    • editMode

      public abstract Optional<EditMode> editMode()
      Describes the editing mode for the request.
    • 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.
    • builder

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

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

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