Generate Image
generate_imageCreate images from text descriptions using Google Gemini models. Get a saved file path for each generated image.
Instructions
Create a new image from a text prompt using Google Gemini image models. Returns the file path of the saved image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model ID to use. Options: gemini-3.1-flash-image-preview (default), gemini-2.5-flash-image, gemini-3-pro-image-preview | |
| prompt | Yes | Text description of the image to generate, e.g. "a watercolor painting of a sunset over mountains" | |
| aspectRatio | No | Aspect ratio of the generated image. Default: 1:1 | 1:1 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model ID that was used for generation | |
| filePath | Yes | Absolute path where the generated image was saved | |
| sizeBytes | Yes | Size of the generated image in bytes |