gemini_generate_image
Generate an image from a text prompt and save it to a specified output path, returning the file path. Use a session ID to create follow-up variations that keep prior context.
Instructions
Generate an image and save it to output_path. Returns the saved path, not the image.
backend: "api" = google-genai SDK with GEMINI_API_KEY (API credit, fast); "agy" = agy's built-in generator (subscription, ~50 s per image). With a session_id, earlier images and analyses in that session are given as context, so "same character, brighter" style follow-ups work. Read the saved image to check it.
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": "gemini_generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| backend | No | api | |
| session_id | No | ||
| output_path | Yes |