Request body.
Optionalaspect_ratio?: stringDesired aspect ratio of the output, e.g. "1:1" or "16:9". Not supported by all models; omit to use the model's default.
Optionalbackground?: stringBackground treatment for the output. Accepted values and behavior are model-dependent.
Optionalheight?: numberExplicit output height in pixels. Takes precedence over size when both are provided. Not supported by all models.
Optionalimage_size?: stringOutput resolution tier for Gemini models, e.g. "1K", "2K", or "4K". Ignored by non-Gemini models.
One or more source images to edit. Each image must be supplied as a base64-encoded object.
Optionalmodel?: stringModel identifier to use for editing. Omit to use the platform default image model.
Optionaloutput_format?: stringDesired MIME type or format for the returned image. Common values: "png", "jpeg", "webp". Defaults to the model's native format.
Natural-language description of the edit to apply to the source image(s).
Optionalquality?: stringQuality preset for the output image. Accepted values and behavior are model-dependent.
Optionalsize?: stringOutput dimensions as a WxH string, e.g. "1024x1024". Applies to OpenAI-compatible models. Omit to use the model's default.
Optionalstyle?: stringStyle preset applied to the edit. Accepted values and behavior are model-dependent.
Optionalwidth?: numberExplicit output width in pixels. Takes precedence over size when both are provided. Not supported by all models.
The resulting edited image, including base64 data or a URL depending on the model.
Generate an image from a text prompt
Generates one or more images from a natural-language prompt using the
specified AI image model. The response contains the first generated image;
use n to request additional images (where supported by the model).
The underlying provider is selected by the model parameter. Omit model
to use the platform default. Size, quality, style, and format options are
forwarded to the provider as-is; unsupported combinations for a given model
return a 422 error with the provider's error message.
This endpoint requires authentication. The request is billed against the
workspace associated with the authenticated user.
Request body.
Optionalaspect_ratio?: stringDesired aspect ratio of the output, e.g. "1:1" or "16:9". Not supported by all models; omit to use the model's default.
Optionalbackground?: stringBackground treatment for the output. Accepted values and behavior are model-dependent.
Optionalheight?: numberExplicit output height in pixels. Takes precedence over size when both are provided. Not supported by all models.
Optionalimage_size?: stringOutput resolution tier for Gemini models, e.g. "1K", "2K", or "4K". Ignored by non-Gemini models.
Optionalmodel?: stringModel identifier to use for generation. Omit to use the platform default image model.
Optionaln?: numberNumber of images to generate. Defaults to 1. Values greater than 1 are only supported by models that allow batch generation.
Optionaloutput_format?: stringDesired MIME type or format for the returned image. Common values: "png", "jpeg", "webp". Defaults to the model's native format.
Natural-language description of the image to generate.
Optionalquality?: stringQuality preset for the output image. Accepted values and behavior are model-dependent.
Optionalsize?: stringOutput dimensions as a WxH string, e.g. "1024x1024". Applies to OpenAI-compatible models. Omit to use the model's default.
Optionalstyle?: stringStyle preset applied to the generated image. Accepted values and behavior are model-dependent.
Optionalwidth?: numberExplicit output width in pixels. Takes precedence over size when both are provided. Not supported by all models.
The generated image, including base64 data or a URL depending on the model.
List available image generation models
Returns the list of image generation models available on the platform.
Exactly one entry in the list carries default: true, indicating the model
used when no model parameter is supplied to the generation or editing
endpoints.
This endpoint requires authentication and reflects the models enabled for
the authenticated user's workspace.
Successful response
Edit an image with a text prompt Applies a text-guided edit to one or more source images and returns the resulting image. Pass the source images as base64-encoded objects in the
imagesarray alongside apromptdescribing the desired modification. The underlying provider is selected by themodelparameter. Omitmodelto use the platform default. Size, quality, style, and format options are forwarded to the provider as-is; unsupported combinations for a given model return a 422 error with the provider's error message. This endpoint requires authentication. The request is billed against the workspace associated with the authenticated user.