Class ImageGenerationOptions

java.lang.Object
com.azure.ai.openai.models.ImageGenerationOptions

public final class ImageGenerationOptions extends Object
Represents the request data used to generate images.
  • Constructor Details

    • ImageGenerationOptions

      public ImageGenerationOptions(String prompt)
      Creates an instance of ImageGenerationOptions class.
      Parameters:
      prompt - the prompt value to set.
  • Method Details

    • getPrompt

      public String getPrompt()
      Get the prompt property: A description of the desired images.
      Returns:
      the prompt value.
    • getN

      public Integer getN()
      Get the n property: The number of images to generate. Dall-e-2 models support values between 1 and 10. Dall-e-3 models only support a value of 1.
      Returns:
      the n value.
    • setN

      Set the n property: The number of images to generate. Dall-e-2 models support values between 1 and 10. Dall-e-3 models only support a value of 1.
      Parameters:
      n - the n value to set.
      Returns:
      the ImageGenerationOptions object itself.
    • getSize

      public ImageSize getSize()
      Get the size property: The desired dimensions for generated images. Dall-e-2 models support 256x256, 512x512, or 1024x1024. Dall-e-3 models support 1024x1024, 1792x1024, or 1024x1792.
      Returns:
      the size value.
    • setSize

      public ImageGenerationOptions setSize(ImageSize size)
      Set the size property: The desired dimensions for generated images. Dall-e-2 models support 256x256, 512x512, or 1024x1024. Dall-e-3 models support 1024x1024, 1792x1024, or 1024x1792.
      Parameters:
      size - the size value to set.
      Returns:
      the ImageGenerationOptions object itself.
    • getUser

      public String getUser()
      Get the user property: A unique identifier representing your end-user, which can help to monitor and detect abuse.
      Returns:
      the user value.
    • setUser

      public ImageGenerationOptions setUser(String user)
      Set the user property: A unique identifier representing your end-user, which can help to monitor and detect abuse.
      Parameters:
      user - the user value to set.
      Returns:
      the ImageGenerationOptions object itself.
    • getResponseFormat

      public ImageGenerationResponseFormat getResponseFormat()
      Get the responseFormat property: The format in which image generation response items should be presented.
      Returns:
      the responseFormat value.
    • setResponseFormat

      public ImageGenerationOptions setResponseFormat(ImageGenerationResponseFormat responseFormat)
      Set the responseFormat property: The format in which image generation response items should be presented.
      Parameters:
      responseFormat - the responseFormat value to set.
      Returns:
      the ImageGenerationOptions object itself.
    • getModel

      public String getModel()
      Get the model property: The model name or Azure OpenAI model deployment name to use for image generation. If not specified, dall-e-2 will be inferred as a default.
      Returns:
      the model value.
    • setModel

      public ImageGenerationOptions setModel(String model)
      Set the model property: The model name or Azure OpenAI model deployment name to use for image generation. If not specified, dall-e-2 will be inferred as a default.
      Parameters:
      model - the model value to set.
      Returns:
      the ImageGenerationOptions object itself.
    • getQuality

      public ImageGenerationQuality getQuality()
      Get the quality property: The desired image generation quality level to use. Only configurable with dall-e-3 models.
      Returns:
      the quality value.
    • setQuality

      public ImageGenerationOptions setQuality(ImageGenerationQuality quality)
      Set the quality property: The desired image generation quality level to use. Only configurable with dall-e-3 models.
      Parameters:
      quality - the quality value to set.
      Returns:
      the ImageGenerationOptions object itself.
    • getStyle

      public ImageGenerationStyle getStyle()
      Get the style property: The desired image generation style to use. Only configurable with dall-e-3 models.
      Returns:
      the style value.
    • setStyle

      Set the style property: The desired image generation style to use. Only configurable with dall-e-3 models.
      Parameters:
      style - the style value to set.
      Returns:
      the ImageGenerationOptions object itself.