Skip to Content
MosaicMosaicDocs
Tool Reference

GenerateImage

Generate or edit an image with Google's Nano Banana image model and save the result in static file service.

Starter documentation. Features and account details may differ from this deployment.

GenerateImage

Generate or edit an image with Google's Nano Banana image model and save the result in static file service. Use for pictures, illustrations, diagram concepts, logo ideas, mockups, or edits based on reference photos. When the user supplies photos or asks to modify an existing image, pass them in referenceImages; describing a photo in the prompt alone does not send it to the image model. Describe the subject, style, composition, lighting, and any text to render; only the prompt is required. Refer to reference images by their order (image 1, image 2, image 3) when explaining how to use them. Returns the static file ID and image URL; to edit the result, pass that ID in referenceImages. The tool displays the image inline in chat. In channel messages without tool cards, copy the returned markdown verbatim on its own line; it includes dimensions so the image reserves space before loading. Do not cite it as a document. Generation takes several seconds.

Parameters

ParameterTypeRequiredDescription
promptstringYesDetailed description of the image to generate: subject, style (photo, illustration, flat vector...), composition, colours, mood, and any text that must appear.
aspectRatio"square" | "landscape" | "portrait" | "widescreen" | "tall"NoShape of the image. Omit for the model default (square). widescreen (16:9) suits banners and slides, tall (9:16) suits phone screens and stories.
referenceImagesImageReferenceInput[]NoUp to three reference photos, in the order used by the prompt. Use type document with a Mosaic image document ID, or type staticFile with the UUID from /file/<id> in an uploaded attachment's source URL or the staticFileId of a previous generation. Use the actual IDs supplied in the conversation or by tools; do not invent IDs. Omit for text-only generation.

On this page