generate_image
Create or edit images from text prompts or up to 14 reference images, with options for aspect ratio, output format, and saving to a file.
Instructions
Generate an image using Google Nano Banana (Gemini) AI model. Can generate from text only, or use one or more reference images (up to 14) to guide generation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model to use: gemini-2.5-flash-image (fast) or gemini-3-pro-image-preview (high quality, default) | gemini-3-pro-image-preview |
| prompt | Yes | Text description of the image to generate or instructions for editing/combining reference images | |
| imagePaths | No | Optional array of file paths to reference images (up to 14). Supports png, jpg, jpeg, webp, gif. | |
| outputPath | No | File path to save the generated image. If not provided, image data is returned inline. | |
| aspectRatio | No | Aspect ratio of the generated image | 1:1 |
| outputFormat | No | Output image format | png |