generate_image
Create or edit images through OpenRouter or self-hosted OpenAI-compatible endpoints, saving each output with a JSON sidecar and returning file paths plus a preview.
Instructions
Generate image(s) via OpenRouter or a self-hosted OpenAI-compatible server. Saves files plus a JSON sidecar (full request, seed, cost) and returns paths and a preview.
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 | ||
| mask | No | PNG mask/overlay for edits (requires references). Same dimensions as the first reference. Path rules as for references. | |
| seed | No | For reproducibility where the model supports it. | |
| size | No | e.g. 1024x1024 | |
| extra | No | Raw fields deep-merged into the request (e.g. num_inference_steps for vLLM-Omni). | |
| model | No | Model id. Omit for the profile's default. | |
| preset | No | Named preset from the config (see list_presets). | |
| prompt | Yes | Image prompt. Phrase what you want positively; image models often ignore or invert negations. | |
| subdir | No | Subfolder name under the output dir. | |
| profile | No | Endpoint profile (see list_profiles). Omit for the default. | |
| quality | No | ||
| provider | No | OpenRouter provider routing (only, order, allow_fallbacks, zdr, data_collection, options). OpenRouter profiles only. | |
| background | No | ||
| references | No | Reference images for image-to-image: https URLs or absolute local paths inside the output folder or [mcp].reference_dirs (a file attached in the chat is not on disk). | |
| resolution | No | 512, 1K, 2K or 4K (OpenRouter, model dependent) | |
| aspect_ratio | No | e.g. 16:9 (OpenRouter; extra field elsewhere) | |
| output_format | No |