Edit image (OpenAI)
edit_imageEdit or combine existing images by applying a text prompt, such as placing a product from one image onto another image's background. Use an optional mask to target specific areas.
Instructions
Edit or combine existing images with a prompt (e.g. "put the product from image 1 on the background from image 2"). Optional mask: transparent pixels mark the area to change. Results are saved to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of images (1–10). Default 1. | |
| mask | No | Mask image (same forms as images). PNG with alpha; same size as the first image. | |
| size | No | "auto", "1024x1024", "1536x1024" (landscape), "1024x1536" (portrait). gpt-image-2 and 2.5 models also accept any WIDTHxHEIGHT: multiples of 16, aspect 1:3–3:1, max 3840x2160 (e.g. "1920x1088", "3840x2160"). | |
| model | No | OpenAI image model. Known: gpt-image-2.5-flare, gpt-image-2.5-sunburst, gpt-image-2, gpt-image-1.5, chatgpt-image-latest, gpt-image-1-mini. Dated snapshots (e.g. gpt-image-2-2026-04-21) also work. Default: gpt-image-2.5-flare. Call list_models for capabilities. | gpt-image-2.5-flare |
| images | Yes | 1–16 input images: local file paths (png/jpg/webp), http(s) URLs, data URLs, or OpenAI file IDs. | |
| prompt | Yes | What to generate. Describe style in the prompt. | |
| quality | No | Default "auto". xhigh and max are only on gpt-image-2.5-flare / -sunburst. | |
| background | No | "transparent" needs output_format png or webp. | |
| moderation | No | "low" = less restrictive filtering. | |
| output_dir | No | Where to save files. Default /root/Pictures/openai-image-mcp. | |
| output_format | No | Default png. | |
| include_images | No | Also return the images inline so the client can display them. Large; off by default. | |
| input_fidelity | No | How closely to preserve input details/faces. gpt-image-1.5: low|high; gpt-image-1-mini: low; omit for gpt-image-2+. | |
| filename_prefix | No | File name prefix. Defaults to a slug of the prompt. | |
| output_compression | No | 0–100, jpeg/webp only. |