generate_image
Create images from text descriptions using Google Gemini. Specify aspect ratio and output path as needed.
Instructions
Generate an image from a text description using Google Gemini. Returns the file path of the generated image.
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 |
|---|---|---|---|
| prompt | Yes | A detailed description of the image you want to generate | |
| outputPath | No | Optional custom file path for saving the image. If not provided, uses auto-generated filename in output directory. | |
| aspectRatio | No | Optional aspect ratio for the generated image. If not provided, Gemini will auto-select based on the prompt. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |