<!-- BusyBot node reference — https://busybot.net/tools/openai-image-edit/ -->

> Node: OpenAI Image Edit (`openai_image_edit`) · Action (binary) · v1
> Category: AI · Credentials: OpenAI (`openai`)
> Updated: 2026-08-16

# OpenAI Image Edit

> Edit images using OpenAI DALL-E and GPT-Image models

## Overview

The OpenAI Image Edit tool calls the OpenAI Images Edit API (POST /v1/images/edits) to modify an existing image based on a text prompt. It supports two models: (1) DALL-E 2 — classic inpainting with an optional transparent-area mask PNG; (2) gpt-image-1 — newer model that edits based on prompt alone without requiring a mask, supports quality and additional sizes. The tool reads a source image from binary input, uploads it as multipart/form-data along with the prompt and optional parameters, then receives the edited image(s) either as base64 data (decoded to binary) or as temporary URLs. Multiple output images per input are supported.

**Category:** AI  
**Tool Name:** `openai_image_edit`  
**Version:** 1

**Appearance:** Icon: `openai` | Color: `#10a37f`

## Node Type

**Action (Binary)** — handles file/binary data operations

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **OpenAI** credentials.
See the [Credentials Guide](https://busybot.net/credentials/openai/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Model | `options` | No | (current default) | The OpenAI image editing model. The /images/edits endpoint only supports gpt-image-1 (modern, prompt-only) and DALL·E 2 (legacy, mask-based inpainting, PNG, <4MB, square). DALL·E 3 is generation-only and not available here. |
| | | | | Options: the OpenAI image-edit models available to your workspace — pick one from the dropdown. |
| Prompt | `string` | Yes | — | A text description of the desired edit. For gpt-image-1 this drives the entire edit. For DALL-E 2 this describes what should appear in the transparent mask region. Supports expressions. |
| Input Binary Property | `string` | No | `data` | Name of the binary property containing the source image to edit. |
| Mask Binary Property | `string` | No | `mask` | Name of the binary property containing the mask image. The mask must be a PNG with transparent areas indicating where the edit should be applied. Same dimensions as the source image. Only used with DALL-E 2. _(shown when Model is `dall-e-2`)_ |
| Output Binary Property | `string` | No | `data` | Name of the binary property to write the edited image(s) to. |
| Options | `collection` | No | `{}` | Optional image settings — add only the fields you need. |
| — Number of Images | `number` | No | `1` | Number of edited images to generate (1-10). |
| — Size | `options` | No | `auto` | Output image resolution. DALL-E 2 supports 256x256, 512x512, 1024x1024. gpt-image-1 also supports 1536x1024, 1024x1536, and auto. |
| | | | | Options: `auto` (gpt-image-1 only), `256x256` (small square, DALL-E 2), `512x512` (medium square, DALL-E 2), `1024x1024` (large square, both models), `1536x1024` (landscape, gpt-image-1 only), `1024x1536` (portrait, gpt-image-1 only) |
| — Quality | `options` | No | `auto` | Image quality level. Only available for gpt-image-1. |
| | | | | Options: `auto`, `low` (fastest, lowest cost), `medium` (balanced), `high` (highest fidelity) |
| — Response Format | `options` | No | `binaryData` | How to return the edited image(s). Binary Data decodes and stores the image. Image URL returns a temporary URL. |
| | | | | Options: `binaryData`, `imageUrl` |
| Include Input | `boolean` | No | `false` | Whether to include the original input item JSON fields in the output. |
| Max Concurrency | `number` | No | `5` | Maximum number of items to process concurrently. Keep low to respect OpenAI rate limits. |

## Output Data

**One output item per edited image**, so an input item with **Number of Images** set to 3 fans out into three output items. Each carries the edit metadata in its JSON, and the image itself as binary data on the property named by **Output Binary Property** (`data` by default), stored as `edited_<index>.png` and merged with any binary the input item already had.

```json
{
  "imageIndex": 0,
  "edited": true,
  "model": "the image model that produced the edit"
}
```

- `imageIndex` is the position of this image within the request — `0` for the first, `1` for the second, and so on.
- When the API returns a temporary URL instead of image data, the item carries `imageUrl` in the JSON and no new binary. These URLs expire, so download or store the image promptly.
- The rest of the input item JSON is dropped unless **Include Input** is on. With **Include Input** on, every fanned-out item repeats the same input fields.

## Usage Examples

- Edit an image by describing changes with gpt-image-1
- Inpaint a region of an image using DALL-E 2 with a mask
- Add objects to an existing image with a text prompt
- Generate multiple edit variations of a source image
- Remove a background element using a transparent mask

## Example Configuration

Prompt-only edit of an image arriving on the default binary property:

```json
{
  "type": "openai_image_edit",
  "parameters": {
    "prompt": "Replace the background with a bright studio backdrop.",
    "inputBinaryPropertyName": "data",
    "outputBinaryPropertyName": "data"
  }
}
```

Three high-quality landscape variants written to a named property:

```json
{
  "type": "openai_image_edit",
  "parameters": {
    "prompt": "{{ $json.editInstruction }}",
    "inputBinaryPropertyName": "photo",
    "outputBinaryPropertyName": "variants",
    "includeInput": true,
    "options": {
      "n": 3,
      "size": "1536x1024",
      "quality": "high"
    }
  }
}
```

Mask-based inpainting with DALL-E 2:

```json
{
  "type": "openai_image_edit",
  "parameters": {
    "model": "dall-e-2",
    "prompt": "A potted fern on the empty side table.",
    "inputBinaryPropertyName": "room",
    "maskBinaryPropertyName": "mask",
    "outputBinaryPropertyName": "editedRoom",
    "options": {
      "size": "1024x1024"
    }
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

The OpenAI Image Edit tool modifies an existing image via the OpenAI Images Edit API, supporting DALL-E 2 inpainting with an optional mask or gpt-image-1 for prompt-only edits. Use it when a workflow needs to alter image content, remove objects, or apply prompt-driven style changes without regenerating an image from scratch. It produces one or more edited images as binary data on the main channel, with errors routed to the error channel.