generate_image
Creates images from text prompts via OpenRouter and saves them to disk, with options for model, aspect ratio, format, count, and seed.
Instructions
Generate image from text prompt via OpenRouter (Gemini Flash Image, Recraft V4, GPT Image, Flux, etc). Saves to file.
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 |
|---|---|---|---|
| n | No | Number of images (1-10, default: 1) | |
| seed | No | Seed for deterministic output | |
| model | No | Model ID (default: google/gemini-2.5-flash-image) | |
| prompt | Yes | Text description of the image | |
| quality | No | ||
| output_dir | No | Save directory (default: ./generated) | |
| aspect_ratio | No | 1:1, 16:9, 9:16, 4:3, 3:4 | |
| output_format | No | Default: png |