Generate Image
nanobanana_generate_imageCreates images from descriptive text prompts using Google's Gemini models and saves the result to a specified file path.
Instructions
Generate an image from a text prompt using Google's Gemini image generation models.
This tool creates images from descriptive text prompts using Gemini's multimodal capabilities. For best results, be specific about:
Subject matter and composition
Art style (photorealistic, illustration, oil painting, etc.)
Lighting and atmosphere
Colors and mood
Args:
prompt (string): Text description of the image to generate
model (string): Gemini model to use (default: gemini-2.0-flash-exp-image-generation)
output_path (string): File path to save the generated image
Returns: JSON with success, saved_to, mime_type, model, text
Examples:
"A serene mountain lake at sunset with purple and orange sky reflections"
"Cute cartoon robot holding a coffee cup, digital art style"
"Professional product photo of a sleek smartphone on white background"
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>",
"output_path": "<output_path>"
},
"name": "nanobanana_generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Gemini model to use. 'gemini-2.0-flash-exp-image-generation' is optimized for image generation. | gemini-2.0-flash-exp-image-generation |
| prompt | Yes | Text description of the image to generate. Be specific about subject, style, lighting, composition, and mood for best results. | |
| output_path | Yes | File path to save the generated image. |