Generate an image with OpenAI
chatgpt_generate_imageCreate images from text prompts using OpenAI's image model, return them for Claude to view and describe, and optionally save them to disk.
Instructions
Create an image from a text description using OpenAI's image model (the same family ChatGPT uses). The image is returned so Claude can see and describe it. If IMAGE_OUTPUT_DIR is set, it is also saved to disk.
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": "chatgpt_generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Image size. 1536x1024 is landscape, 1024x1536 is portrait. Default: auto. | |
| count | No | How many images (1 to 4). Default 1. | |
| model | No | Image model. Default: OPENAI_IMAGE_MODEL (gpt-image-2). | |
| prompt | Yes | A detailed description of the image. | |
| quality | No | Quality. Higher costs more. |