edit_image
Applies text-guided edits to local images and writes the result to a specified file or directory.
Instructions
Edit or combine local images with POST /v1/images/edits (multipart). Use for gpt-image-2 image-to-image. Do not set input_fidelity for gpt-image-2.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | Optional local mask image path | |
| size | No | Output size, e.g. auto or 1024x1024. Defaults to auto. | |
| model | No | Configured model to start with. Defaults to the first model configured for this tool. | |
| images | Yes | Local image file paths to send as repeated multipart field `image` (max 16). | |
| prompt | Yes | Edit instruction | |
| quality | No | Image quality | |
| filename | No | Optional AI-chosen basename (Unicode allowed, up to 200 UTF-8 bytes, optional extension). Requires output_path to be a directory. Existing names get numbered suffixes instead of being overwritten. Unsafe names are rejected before generation, not rewritten. | |
| output_path | Yes | File or directory to write. Relative paths resolve against process.cwd(). | |
| auto_fallback | No | Try the next configured model after an upstream failure. Overrides GEN_IMAGE_AUTO_FALLBACK. |