v1/image-gen wire contract.
This targets a dedicated Simular endpoint rather than an OpenAI-compatible
one; the endpoint picks the concrete backend model from the [ImageQuality]
argument, so the resolved model name is nominal (used only for name).
Reference images are downscaled / transcoded and size-checked against the
model’s configured image limits before sending, exactly as the VLM/LLM image
paths do.
Constructor
Returns
ImageGenModel
Properties
string
required
The model identifier from provider configuration. Nominal — the
endpoint selects the concrete model from the [
ImageQuality] argument.Methods
availableAliases()
byAlias
will accept on the current machine.
Returns
string[]
byAlias()
Parameters
string
required
Returns
ImageGenModel
checkAuth()
default()
Returns
ImageGenModel
generate()
prompt.
prompt: a description of the image to generate.quality: selects the model tier; defaults toImageQuality.Fast.aspectRatio: the output shape; defaults toImageAspectRatio.Square.images: reference images (count capped by the model’s configuredmax_images_per_requestimage limit) that condition the result; each is downscaled / transcoded to a supported format and size-checked before sending. Passnull/ omit for none.
[image, description] tuple: the first generated [Image] and
the model’s text description (an empty string when the model returns none).
Parameters
string
required
null | ImageQuality
null | ImageAspectRatio
null | Image[]
Returns
[Image, string]
simularImageGen()
Returns
ImageGenModel
