Generate image
generate_imageTurn text prompts into images with Google's Gemini Nano Banana models. Specify a prompt, model, aspect ratio, and file name; saves the image locally and returns its path.
Instructions
Generate an image from a text prompt using Google's Gemini image models (Nano Banana). Saves the result as a local file and returns its path.
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 | Gemini image model id. Defaults to "gemini-2.5-flash-image". | |
| prompt | Yes | Text description of the image to generate | |
| file_name | No | Optional output file name. Defaults to a timestamp. | |
| aspect_ratio | No | Optional aspect ratio, e.g. "1:1", "16:9", "9:16". |