# Class GenerateImageRequest

java.lang.Object
com.codename1.ai.GenerateImageRequest

public final class GenerateImageRequest extends Object
Request payload for `ImageGenerator.generate(GenerateImageRequest)`. Mutable image-generation request shared by the supported providers. Provider-specific values that are unsupported may be ignored or rejected by the selected `ImageGenerator`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GenerateImageRequest(String prompt)`
  Creates a request with required prompt text.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getCount()`
  `String`
  `getModel()`
  `String`
  `getPrompt()`
  `String`
  `getQuality()`
  `Long`
  `getSeed()`
  `String`
  `getSize()`
  `String`
  `getStyle()`
  `GenerateImageRequest`
  `setCount(int count)`
  Number of images to generate (DALL-E 3 supports 1; older models up to 10).
  `GenerateImageRequest`
  `setModel(String model)`
  `GenerateImageRequest`
  `setQuality(String quality)`
  `GenerateImageRequest`
  `setSeed(Long seed)`
  `GenerateImageRequest`
  `setSize(String size)`
  `"1024x1024"`, `"1024x1792"`, `"1792x1024"` for DALL-E 3.
  `GenerateImageRequest`
  `setStyle(String style)`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### GenerateImageRequest

    public GenerateImageRequest(String prompt)
    Creates a request with required prompt text.
    Parameters:
      `prompt` - description of the image to generate

- ## Method Details

  - ### getPrompt

    public String getPrompt()
    Returns:
      image description sent to the provider

  - ### getModel

    public String getModel()
    Returns:
      requested model id, or `null` for generator default

  - ### setModel

    public GenerateImageRequest setModel(String model)
    Parameters:
      `model` - provider model id, or `null` for generator default
    Returns:
      this request

  - ### getSize

    public String getSize()
    Returns:
      requested dimensions such as `1024x1024`

  - ### setSize

    public GenerateImageRequest setSize(String size)
    `"1024x1024"`, `"1024x1792"`, `"1792x1024"` for DALL-E 3. Default is `"1024x1024"`.

  - ### getStyle

    public String getStyle()
    Returns:
      provider style value, or `null` when unspecified

  - ### setStyle

    public GenerateImageRequest setStyle(String style)
    Parameters:
      `style` - provider-specific rendering style, or `null`
    Returns:
      this request

  - ### getQuality

    public String getQuality()
    Returns:
      provider quality tier, or `null` when unspecified

  - ### setQuality

    public GenerateImageRequest setQuality(String quality)
    Parameters:
      `quality` - provider-specific quality tier, or `null`
    Returns:
      this request

  - ### getCount

    public int getCount()
    Returns:
      requested image count

  - ### setCount

    public GenerateImageRequest setCount(int count)
    Number of images to generate (DALL-E 3 supports 1; older models up to 10).

  - ### getSeed

    public Long getSeed()
    Returns:
      deterministic seed, or `null` when unspecified

  - ### setSeed

    public GenerateImageRequest setSeed(Long seed)
    Parameters:
      `seed` - deterministic seed where supported, or `null`
    Returns:
      this request