Generate image (GPT-image)
generate_imageTurns text prompts into images using an OpenAI-compatible API, returning the image URL and optional local file path.
Instructions
Generate one or more images from a text prompt via the configured OpenAI-compatible image API. Endpoint, key and default model come from config (see get_config / set_config); per-call args override them. Returns the image URL, and the local path if save_dir is set or save=true.
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 | ||
| save | No | ||
| size | No | ||
| model | No | ||
| prompt | Yes | ||
| quality | No | ||
| include_preview | No |