generate_image
Creates images from text prompts and optional base or reference images, then saves the result to a specified local PNG path.
Instructions
Generates an image and saves it to a local file.
operation: "generate" (the only operation in this version). prompt: full instructions (composition, style, what is forbidden). output_path: output .png file (relative to IMAGEGEN_ROOT or absolute). base_image: image whose composition must be preserved; attached first. reference_images: style images, attached after the base, in the given order. size: desired "WIDTHxHEIGHT" (e.g. "1536x864"). With the codex backend it is only requested in text and not guaranteed; check width/height in the result. overwrite: allows replacing an existing file.
Returns path, format, width, height, operation, backend, model, warnings and log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| prompt | Yes | ||
| operation | Yes | ||
| overwrite | No | ||
| base_image | No | ||
| output_path | Yes | ||
| reference_images | No |