Generate image (ChatGPT)
generate_imageCreate images from text prompts and save them to disk, using the local ChatGPT app and your account without an API key. Pass reference images to guide style and composition.
Instructions
Generate images with ChatGPT's image generator, through the ChatGPT/Codex app installed on this machine and the user's ChatGPT account (no API key). Local images can be passed as style/composition references. Each call takes about 30-90 seconds. Saves the files to disk and returns their paths plus 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 | Number of variants to generate. | |
| prompt | Yes | Detailed description of the image to generate. | |
| filename | No | Base file name without extension (e.g. 'hero-banner'). Default: timestamp. | |
| output_dir | No | Absolute directory to save files in. Default: /root/Pictures/chatgpt-images | |
| orientation | No | Image orientation. | auto |
| transparent | No | Transparent background (PNG with alpha). | |
| include_preview | No | If true, also return the image so the assistant can see it. | |
| reference_images | No | Absolute paths of images to use as references (optional). |