Edit image
edit_imageEdit or transform images using a ChatGPT plan—no API key required. Provide 1-5 reference images, specify what to change, and get a new saved file.
Instructions
Edit or transform existing images, or create a new image guided by reference images, using the user's ChatGPT plan (no API key). Pass 1-5 images; refer to them in the prompt as Image 1, Image 2… (Image 1 is the primary edit target). State exactly what must change AND what must stay unchanged. Good for background replacement or removal, object removal/insertion, restyling, relighting, text localization, compositing and sketch-to-render. The input file is never modified; the result is saved as a new file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of variants of this same prompt, 1-4 (default 1). Each variant is a separate request against the user's ChatGPT image quota. For several different assets make one call per asset instead. | |
| images | Yes | 1-5 input images: local file paths (absolute, ~/…, or relative to the workspace root), http(s) URLs, or data:image/…;base64 URLs. PNG, JPEG or WebP, up to 15 MB each. | |
| prompt | Yes | Edit instructions, e.g. "Image 1: replace only the sky with a warm sunset; keep the building, people and framing unchanged." | |
| overwrite | No | Replace an existing file at output_path (default false). | |
| background | No | Background: "transparent" returns a PNG with a real alpha channel (cutouts, sprites, icons, stickers, logos); "opaque" asks for a filled background (a hint — also describe the backdrop in the prompt); "auto" (default) lets the service decide. | auto |
| output_path | No | Where to save: a .png/.jpg/.jpeg file path or a directory, absolute or relative to the workspace root. Omit to save in the server's image library (outside the project). Existing files are never replaced unless overwrite=true (a -2, -3… sibling is used instead); with n>1 a -1, -2… suffix is added. | |
| aspect_ratio | No | Canvas shape: auto (default), 1:1, 4:5, 5:4, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9 or 9:21. The service chooses the exact pixel size from the prompt; this adds an explicit aspect-ratio line to it. | auto |
| output_format | No | File format: png (default) or jpeg (converted locally; cannot be transparent). Inferred from output_path's extension when given. | |
| include_preview | No | Attach a downscaled preview so you can check the result visually (default true). Set false to save tokens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| images | Yes | Saved images (full resolution). | |
| prompt | Yes | The exact prompt sent to the image service. | |
| failures | Yes | Errors for variants that failed (partial success). | |
| warnings | Yes | ||
| elapsed_ms | Yes |