Manages AI image generation across registered image providers, giving app developers a single entry point to discover available models and request generated images. Registered as the "imageGenerationManager" service, it is reached from GraalJS via services.imageGenerationManager. Available models are cached on the current request context so repeated lookups within a request do not re-query the underlying providers.
Group: Managers
Properties
| Property | Returns | Description |
|---|---|---|
| availableModels | List<ImageModel> | Lists the image generation models available to the current organisation, combining each provider's global models with any models scoped to the tenant. The result is cached on the current request context for the remainder of the request, so it is cheap to call more than once. |
| availableProviders | List<ImageProvider> |
Methods
getAvailableModels()
Returns: List<ImageModel>
Lists the image generation models available to the current organisation, combining each provider's global models with any models scoped to the tenant. The result is cached on the current request context for the remainder of the request, so it is cheap to call more than once.
getModelByName(String name)
Returns: ImageModel
Looks up an available image model by its name, searching across all registered providers.
| Parameter | Description |
|---|---|
name | the model name to look for, matched against ImageModel.getName() |
imageOptionsBuilder()
Returns: ImageGenerationOptionsBuilder
Creates a new, empty builder for assembling the options passed to generateImage.
generateImage(ImageGenerationOptions options)
Returns: Object
Generates one or more images by routing the given options to the provider that owns the requested model. This is an expensive, network-bound call to the underlying image generation service.
| Parameter | Description |
|---|---|
options | the generation options, including the model to use; must have a non-null model |