image.generate
Generate images with Gemini AI, save them to disk, and retrieve structured metadata. Supports custom dimensions, transparency settings, and reference images for guided editing.
Instructions
Generate an image with Gemini using a Google AI Studio API key. Saves the result to disk and returns structured metadata.
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": "image.generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| model | No | ||
| width | No | ||
| height | No | ||
| prompt | Yes | ||
| background | No | ||
| output_dir | No | ||
| filename_hint | No | ||
| transparency_mode | No | ||
| reference_image_paths | No | ||
| transparency_threshold | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| model | Yes | ||
| width | No | ||
| height | No | ||
| provider | Yes | ||
| warnings | Yes | ||
| mime_type | Yes | ||
| transparency | No | ||
| prompt_summary | Yes |