Fluent builder for assembling ImageGenerationOptions before calling ImageGenerationManager.generateImage. Obtained from ImageGenerationManager.imageOptionsBuilder(), it accumulates the target model, prompt and formatting choices and validates the required fields when build() is called.

Group: Builders


Methods

model(ImageModel model) · setModel(ImageModel model) · usage(String usage) · setUsage(String usage) · prompt(String prompt) · setPrompt(String prompt) · count(Integer count) · setCount(Integer count) · size(String size) · setSize(String size) · setStyle(String style) · style(String style) · build()

model(ImageModel model)

Returns: ImageGenerationOptionsBuilder

Specifies the model to use for generating the images.

ParameterDescription
modelthe image model to generate with

setModel(ImageModel model)

Returns: void

Specifies the model to use for generating the images.

ParameterDescription
modelthe image model to generate with

usage(String usage)

Returns: ImageGenerationOptionsBuilder

Identifies who is making this request, typically the calling app name or task.

ParameterDescription
usagethe usage identifier

setUsage(String usage)

Returns: void

Identifies who is making this request, typically the calling app name or task.

ParameterDescription
usagethe usage identifier

prompt(String prompt)

Returns: ImageGenerationOptionsBuilder

Sets the text description of the desired image or images.

ParameterDescription
promptthe generation prompt

setPrompt(String prompt)

Returns: void

Sets the text description of the desired image or images.

ParameterDescription
promptthe generation prompt

count(Integer count)

Returns: ImageGenerationOptionsBuilder

Sets the number of images to generate.

ParameterDescription
countthe number of images to generate

setCount(Integer count)

Returns: void

Sets the number of images to generate.

ParameterDescription
countthe number of images to generate

size(String size)

Returns: ImageGenerationOptionsBuilder

Sets the size of the generated images, for example 512x512. The available sizes for the chosen model can be read from ImageModel.getSizes().

ParameterDescription
sizethe requested image size

setSize(String size)

Returns: void

Sets the size of the generated images, for example 512x512. The available sizes for the chosen model can be read from ImageModel.getSizes().

ParameterDescription
sizethe requested image size

setStyle(String style)

Returns: void

Sets the visual style of the generated images. Supported values are provider and model specific.

ParameterDescription
stylethe requested image style

style(String style)

Returns: ImageGenerationOptionsBuilder

Sets the visual style of the generated images. Supported values are provider and model specific.

ParameterDescription
stylethe requested image style

build()

Returns: ImageGenerationOptions

Validates the accumulated fields and builds the immutable ImageGenerationOptions to pass to ImageGenerationManager.generateImage.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.