Edit image
edit_imageModify an existing image using a text instruction, such as removing objects, changing backgrounds, or applying styles, while preserving the original and saving edited copies with previews and file paths.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | Optional PNG whose transparent areas mark where to edit (openai-api only). Resized to the image if needed. | |
| size | No | Output size as width x height in px, e.g. "1024x1024". Defaults to the size of the input image. | |
| count | No | Number of edited variants (1-4). | |
| image | Yes | Path of the image to edit (inside the working folder). | |
| prompt | Yes | The change to make. Say what should change and, if it matters, what must stay the same. | |
| out_name | No | File name without extension, relative to the output folder. Defaults to "<input name>-edited". | |
| references | No | Extra images the edit uses: an object to insert, or a style to apply (inside the working folder). | |
| transparent | No | Ask for a transparent background, e.g. for a cutout. |