generate_image
Creates one PNG image from a text prompt using your signed-in ChatGPT plan, with optional reference images, chroma-keying, trimming, and downscaling.
Instructions
Generate one image with Codex's built-in image tool on the signed-in ChatGPT plan.
Takes ~30-60 s and counts against the plan's Codex usage limits. output_path: absolute path ending in .png; existing files are kept unless overwrite=true. reference_images: local image paths Codex should follow for design, palette or style. reasoning_effort: Codex effort before calling the tool ("low" is fastest).
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>",
"output_path": "<output_path>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trim | No | ||
| prompt | Yes | ||
| max_size | No | ||
| overwrite | No | ||
| tolerance | No | ||
| chroma_key | No | ||
| output_path | Yes | ||
| timeout_seconds | No | ||
| reasoning_effort | No | low | |
| reference_images | No |