Codex / OpenAI Image
v0.1.2Generate, edit and make matching sets of images with the Codex CLI or the OpenAI Images API
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_image Generate image
Generate one or more images from a text prompt. Saves full-size PNGs (plus a .json sidecar with the prompt and settings) in the output folder and returns their paths with small previews.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | What to draw. Be specific about subject, style, composition and colours. |
count | integer | Number of variants to generate (1-4). |
out_name | string | File name without extension, relative to the output folder, e.g. "icons/rocket". Defaults to a slug of the prompt. |
references | array | Paths of existing images to match the style of (inside the working folder). |
size | string | Width x height in px, e.g. "1024x1024" or "1536x1024". |
transparent | boolean | Ask for a transparent background. |
edit_image Edit image
Change an existing image with a text instruction (e.g. 'make the sky a sunset', 'remove the person on the left', 'turn it into a watercolour', 'remove the background'). The original is never modified; edited copies are saved in the output folder with a .json sidecar, and their paths are returned with small previews.
| Parameter | Type | Description |
|---|---|---|
image * | string | Path of the image to edit (inside the working folder). |
prompt * | string | The change to make. Say what should change and, if it matters, what must stay the same. |
count | integer | Number of edited variants (1-4). |
mask | string | Optional PNG whose transparent areas mark where to edit (openai-api only). Resized to the image if needed. |
out_name | string | File name without extension, relative to the output folder. Defaults to "<input name>-edited". |
references | array | Extra images the edit uses: an object to insert, or a style to apply (inside the working folder). |
size | string | Output size as width x height in px, e.g. "1024x1024". Defaults to the size of the input image. |
transparent | boolean | Ask for a transparent background, e.g. for a cutout. |
generate_set Generate matching set
Generate several different images that share one style, e.g. a set of icons, stickers, badges, character portraits or story illustrations. Each item gets its own file, named after the item, in one folder. Returns paths and previews.
| Parameter | Type | Description |
|---|---|---|
items * | array | The images to make, one per item. |
style * | string | The look every image shares: medium, palette, rendering, lighting, framing, background. |
folder | string | Folder for the set, relative to the output folder. Defaults to a slug of the style. |
references | array | Existing images whose style the whole set should match (inside the working folder). |
size | string | Width x height in px for every image, e.g. "1024x1024". |
transparent | boolean | Ask for transparent backgrounds. |