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

> Node: OpenAI Image (DALL-E) (`openai_image`) · Action (binary) · v1
> Category: Utility · Credentials: OpenAI (`openai`)
> Updated: 2026-08-16

# OpenAI Image (DALL-E)

> Generate, edit, and create variations of images using OpenAI DALL-E

## Overview

The OpenAI Image (DALL-E) tool interacts with OpenAI's image generation API. It supports three operations: (1) generate — create images from a text prompt, receiving b64_json and decoding to binary; (2) edit — edit an existing image with a text prompt and optional mask (inpainting); (3) createVariation — create variations of an existing image. All operations store output images as binary data in the binary store. The generate operation sends a JSON request and decodes the b64_json response. The edit and createVariation operations upload source images (and optional masks) as multipart/form-data. Authentication is via API key sent as Bearer token.

**Category:** Utility  
**Tool Name:** `openai_image`  
**Version:** 1

**Appearance:** Icon: `openai` | Color: `#412991`

## 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.

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Generate | `generate` | Create an image from a text prompt |
| Edit | `edit` | Edit an existing image with a prompt and optional mask (DALL-E 2 only) |
| Create Variation | `createVariation` | Create a variation of an existing image (DALL-E 2 only) |

### Parameters

#### Generate (`generate`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Prompt | `string` | Yes | — | A text description of the desired image. Max 1000 chars for DALL-E 2, 4000 chars for DALL-E 3. Leave it empty to use the incoming item's `prompt` field instead. |
| Model | `options` | No | the platform's current default image model | The OpenAI image generation model. Always uses the latest version (auto-updated). gpt-image-1 is the unified flagship; DALL·E variants kept for backward compatibility. |
| | | | | Options: pick from the dropdown — the list tracks the OpenAI image model families the platform supports, so it is not fixed here. |

#### Edit (`edit`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Prompt | `string` | Yes | — | A text description of the desired image. Max 1000 chars for DALL-E 2, 4000 chars for DALL-E 3. Leave it empty to use the incoming item's `prompt` field instead. |
| Input Binary Property | `string` | No | `data` | Name of the binary property containing the source image to edit or create a variation of. Must be a valid PNG, less than 4MB, and square. |
| 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 size as the source image. The mask is optional — it is only sent when the item actually carries that property. |

#### Create Variation (`createVariation`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Input Binary Property | `string` | No | `data` | Name of the binary property containing the source image to edit or create a variation of. Must be a valid PNG, less than 4MB, and square. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Response Format | `options` | No | `binaryData` | How to return the generated image(s). Binary File decodes and stores the image as binary data. Image URL returns a temporary URL. |
| | | | | Options: `binaryData` (shown as "Binary File"), `imageUrl` (shown as "Image URL") |
| Output Binary Property | `string` | No | `data` | Name of the binary property to write the output image(s) to. Names are case-sensitive — see the upstream node's Binary Data panel for the exact names to use. _(shown when Response Format is `binaryData`)_ |
| Options | `collection` | No | `{}` | Additional generation options. Add only the ones you need. |
| — Number of Images | `number` | No | `1` | Number of images to generate. DALL-E 2 supports 1-10. DALL-E 3 always generates 1 image (this parameter is ignored). |
| — Quality | `options` | No | `standard` | Image quality. HD produces finer details and greater consistency. Only available for DALL-E 3. |
| | | | | Options: `standard`, `hd` |
| — Size | `options` | No | `1024x1024` | Image resolution. DALL-E 2: 256x256, 512x512, 1024x1024. DALL-E 3: 1024x1024, 1792x1024, 1024x1792. |
| | | | | Options: `256x256`, `512x512`, `1024x1024`, `1792x1024`, `1024x1792` |
| — Style | `options` | No | `vivid` | Image style. Vivid produces hyper-real and dramatic images. Natural produces more natural, less hyper-real images. Only available for DALL-E 3. |
| | | | | Options: `vivid`, `natural` |
| Max Concurrency | `number` | No | `5` | Maximum number of items to process concurrently. Keep low to respect OpenAI rate limits. |

## Output Data

Results are **merged onto the input item JSON** — the incoming fields pass through unchanged. Every operation **fans out**: one output item per image returned, so asking for 3 images turns one input item into three output items, each carrying its own `imageIndex`.

What lands on each output item depends on **Response Format**:

| Response Format | Item JSON | Binary |
|-----------------|-----------|--------|
| `binaryData` | `imageIndex`, plus the operation's marker field | The image is written to the property named by **Output Binary Property**, as a PNG, merged alongside any binary the input item already carried. File names are `image_{n}.png` for Generate, `edited_{n}.png` for Edit, and `variation_{n}.png` for Create Variation. |
| `imageUrl` | `imageUrl` (a temporary URL from OpenAI), `imageIndex`, plus the operation's marker field | Unchanged — the input item's binary is forwarded and no new binary is written. Download the URL with an HTTP node if you need the bytes. |

Per-operation fields:

| Operation | Fields added |
|-----------|--------------|
| `generate` | `imageIndex`; `revisedPrompt` when the model rewrote your prompt before drawing. |
| `edit` | `imageIndex`, `edited: true` |
| `createVariation` | `imageIndex`, `variation: true` |

Reference the result downstream by expression, e.g. `{{ $json.imageUrl }}` or `{{ $json.revisedPrompt }}`.

## Usage Examples

- Generate an image from a text prompt using DALL-E 3
- Create HD quality images with DALL-E 3
- Edit an image by providing a mask and prompt
- Create variations of an existing image
- Generate multiple image variations with DALL-E 2

## Example Configuration

Generate one high-quality widescreen image and store it as binary:

```json
{
  "type": "openai_image",
  "parameters": {
    "operation": "generate",
    "prompt": "A serene mountain landscape at sunset with snow-capped peaks reflecting in a crystal clear lake",
    "responseFormat": "binaryData",
    "binaryPropertyName": "generated_image",
    "options": {
      "quality": "hd",
      "size": "1792x1024",
      "style": "natural"
    }
  }
}
```

Generate several small images from one prompt — each comes out as its own item:

```json
{
  "type": "openai_image",
  "parameters": {
    "operation": "generate",
    "prompt": "A minimalist logo design for a tech startup",
    "responseFormat": "binaryData",
    "binaryPropertyName": "logo_options",
    "maxConcurrency": 3,
    "options": {
      "n": 5,
      "size": "256x256"
    }
  }
}
```

Inpaint an existing image using a mask carried on the same item:

```json
{
  "type": "openai_image",
  "parameters": {
    "operation": "edit",
    "prompt": "Add a rainbow in the sky",
    "inputBinaryPropertyName": "original_image",
    "maskBinaryPropertyName": "sky_mask",
    "responseFormat": "binaryData",
    "binaryPropertyName": "edited_image",
    "options": {
      "size": "1024x1024"
    }
  }
}
```

Create two variations of a source image and return them as temporary URLs:

```json
{
  "type": "openai_image",
  "parameters": {
    "operation": "createVariation",
    "inputBinaryPropertyName": "source_image",
    "responseFormat": "imageUrl",
    "options": {
      "n": 2,
      "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

Generate, edit, or create variations of images using OpenAI DALL-E models, storing results as binary data.

### Behavior notes

- **Prompts are node-level, with one per-item escape hatch.** The node's parameters are used exactly as typed — `{{ }}` expressions in them are not evaluated. To vary the prompt per item, leave **Prompt** empty and put the text on the incoming item's `prompt` field instead; the node picks it up from there.
- **A missing prompt is an error** on Generate and Edit — if the parameter is empty and the item has no `prompt` field, the item fails.
- **Source images must be square PNGs under 4 MB** for Edit and Create Variation. The mask, when supplied, must be a PNG of the same size with the area to change made transparent.
- **The mask is optional.** If the item does not carry the named mask property, the edit runs without one.
- **Choose the model from the dropdown**, not by typing an ID — the list is kept in step with the image model families the platform supports.

### Important notes

- **Model Limitations**: DALL-E 3 always generates exactly 1 image regardless of the `n` parameter
- **Size Constraints**: DALL-E 2 supports 256x256, 512x512, 1024x1024. DALL-E 3 supports 1024x1024, 1792x1024, 1024x1792
- **Quality and Style**: Only available with DALL-E 3
- **Edit and Variation Operations**: Only supported by DALL-E 2
- **Rate Limits**: Use `maxConcurrency` to control request rate and avoid API limits
- **Image Requirements**: Input images for edit/variation must be PNG format, under 4MB, and square