---
title: DALL·E 2 | Runware Docs
url: https://runware.ai/docs/models/openai-dalle-2
description: DALL·E 2 AI image generator for text guided creation
---
# DALL·E 2

DALL·E 2 is OpenAI’s diffusion based text to image model. It generates high quality images from prompts. It supports inpainting for local edits and outpainting for extended canvases. Developers use it through an API for creative tools, design workflows, and content pipelines.

- **ID**: `openai:2@2`
- **Status**: live
- **Creator**: OpenAI
- **Release Date**: April 6, 2022
- **Capabilities**: Text to Image

## Pricing

- **1k**: `$0.016`

## Compatibility & Validation

`width` and `height` must be used together.

---

The following dimension combinations are supported:

| Configuration | Dimensions |
| --- | --- |
| `0.25K (1:1)` | `256x256` |
| `0.5K (1:1)` | `512x512` |
| `1K (1:1)` | `1024x1024` |

## Request Parameters

**API Options**

Platform-level options for task execution and delivery.

### [taskType](https://runware.ai/docs/models/openai-dalle-2#request-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `imageInference`

Identifier for the type of task being performed

### [taskUUID](https://runware.ai/docs/models/openai-dalle-2#request-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

### [outputType](https://runware.ai/docs/models/openai-dalle-2#request-outputtype)

- **Type**: `string`
- **Default**: `URL`

Image output type.

**Allowed values**: `URL` `base64Data` `dataURI`

### [outputFormat](https://runware.ai/docs/models/openai-dalle-2#request-outputformat)

- **Type**: `string`
- **Default**: `JPG`

Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.

- \`JPG\`: Best for photorealistic images with smaller file sizes (no transparency).
- \`PNG\`: Lossless compression, supports high quality and transparency (alpha channel).
- \`WEBP\`: Modern format providing superior compression and transparency support.

> [!NOTE]
> \*\*Transparency\*\*: If you are using features like background removal or LayerDiffuse that require transparency, you must select a format that supports an alpha channel (e.g., \`PNG\`, \`WEBP\`, \`TIFF\`). \`JPG\` does not support transparency.

**Allowed values**: `JPG` `PNG` `WEBP`

### [outputQuality](https://runware.ai/docs/models/openai-dalle-2#request-outputquality)

- **Type**: `integer`
- **Min**: `20`
- **Max**: `99`
- **Default**: `95`

Compression quality of the output. Higher values preserve quality but increase file size.

### [webhookURL](https://runware.ai/docs/models/openai-dalle-2#request-webhookurl)

- **Type**: `string`
- **Format**: `URI`

Specifies a webhook URL where JSON responses will be sent via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.

**Learn more** (1 resource):

- [Webhooks](https://runware.ai/docs/platform/webhooks) (platform)

### [deliveryMethod](https://runware.ai/docs/models/openai-dalle-2#request-deliverymethod)

- **Type**: `string`
- **Default**: `sync`

Determines how the API delivers task results.

**Allowed values**:

- `sync` Returns complete results directly in the API response.
- `async` Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.

**Learn more** (1 resource):

- [Task Polling](https://runware.ai/docs/platform/task-polling) (platform)

### [uploadEndpoint](https://runware.ai/docs/models/openai-dalle-2#request-uploadendpoint)

- **Type**: `string`
- **Format**: `URI`

Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.

**Common use cases:**

- **Cloud storage**: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.
- **CDN integration**: Upload to content delivery networks for immediate distribution.

```text
// S3 presigned URL for secure upload
https://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600

// Google Cloud Storage presigned URL
https://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789

// Custom storage endpoint
https://storage.example.com/uploads/generated-image.jpg
```

The content data will be sent as the request body to the specified URL when generation is complete.

### [safety](https://runware.ai/docs/models/openai-dalle-2#request-safety)

- **Path**: `safety.checkContent`
- **Type**: `object (2 properties)`

Content safety checking configuration for image generation.

#### [checkContent](https://runware.ai/docs/models/openai-dalle-2#request-safety-checkcontent)

- **Path**: `safety.checkContent`
- **Type**: `boolean`
- **Default**: `false`

Enable or disable content safety checking. When enabled, defaults to `fast` mode.

#### [mode](https://runware.ai/docs/models/openai-dalle-2#request-safety-mode)

- **Path**: `safety.mode`
- **Type**: `string`
- **Default**: `none`

Safety checking mode for image generation.

**Allowed values**:

- `none` Disables checking.
- `fast` Performs a single check.

### [ttl](https://runware.ai/docs/models/openai-dalle-2#request-ttl)

- **Type**: `integer`
- **Min**: `60`

Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.

### [includeCost](https://runware.ai/docs/models/openai-dalle-2#request-includecost)

- **Type**: `boolean`
- **Default**: `false`

Include task cost in the response.

### [numberResults](https://runware.ai/docs/models/openai-dalle-2#request-numberresults)

- **Type**: `integer`
- **Min**: `1`
- **Max**: `20`
- **Default**: `1`

Number of results to generate. Each result uses a different seed, producing variations of the same parameters.

**Generation Parameters**

Core parameters for controlling the generated content.

### [model](https://runware.ai/docs/models/openai-dalle-2#request-model)

- **Type**: `string`
- **Required**: true
- **Value**: `openai:2@2`

Identifier of the model to use for generation.

**Learn more** (3 resources):

- [Text To Image: Model Selection The Foundation Of Generation](https://runware.ai/docs/guides/text-to-image#model-selection-the-foundation-of-generation) (guide)
- [Image Inpainting: Model Specialized Inpainting Models](https://runware.ai/docs/guides/image-inpainting#model-specialized-inpainting-models) (guide)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/guides/image-outpainting#other-critical-parameters) (guide)

### [positivePrompt](https://runware.ai/docs/models/openai-dalle-2#request-positiveprompt)

- **Type**: `string`
- **Required**: true
- **Min**: `1`
- **Max**: `1000`

Text prompt describing elements to include in the generated output.

**Learn more** (2 resources):

- [Text To Image: Prompts Guiding The Generation](https://runware.ai/docs/guides/text-to-image#prompts-guiding-the-generation) (guide)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/guides/image-outpainting#other-critical-parameters) (guide)

### [width](https://runware.ai/docs/models/openai-dalle-2#request-width)

- **Type**: `integer`
- **Required**: true
- **Paired with**: height

Width of the generated media in pixels.

**Learn more** (2 resources):

- [Image To Image: Dimensions Changing Aspect Ratio](https://runware.ai/docs/guides/image-to-image#dimensions-changing-aspect-ratio) (guide)
- [Image Outpainting: Dimensions Critical For Outpainting](https://runware.ai/docs/guides/image-outpainting#dimensions-critical-for-outpainting) (guide)

### [height](https://runware.ai/docs/models/openai-dalle-2#request-height)

- **Type**: `integer`
- **Required**: true
- **Paired with**: width

Height of the generated media in pixels.

**Learn more** (2 resources):

- [Image To Image: Dimensions Changing Aspect Ratio](https://runware.ai/docs/guides/image-to-image#dimensions-changing-aspect-ratio) (guide)
- [Image Outpainting: Dimensions Critical For Outpainting](https://runware.ai/docs/guides/image-outpainting#dimensions-critical-for-outpainting) (guide)

## Response Parameters

### [taskType](https://runware.ai/docs/models/openai-dalle-2#response-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `imageInference`

Type of the task.

### [taskUUID](https://runware.ai/docs/models/openai-dalle-2#response-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID of the task.

### [imageUUID](https://runware.ai/docs/models/openai-dalle-2#response-imageuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID of the output image.

### [imageURL](https://runware.ai/docs/models/openai-dalle-2#response-imageurl)

- **Type**: `string`
- **Format**: `URI`

URL of the output image.

### [imageBase64Data](https://runware.ai/docs/models/openai-dalle-2#response-imagebase64data)

- **Type**: `string`

Base64-encoded image data.

### [imageDataURI](https://runware.ai/docs/models/openai-dalle-2#response-imagedatauri)

- **Type**: `string`
- **Format**: `URI`

Data URI of the output image.

### [seed](https://runware.ai/docs/models/openai-dalle-2#response-seed)

- **Type**: `integer`

The seed used for generation. If none was provided, shows the randomly generated seed.

### [NSFWContent](https://runware.ai/docs/models/openai-dalle-2#response-nsfwcontent)

- **Type**: `boolean`

Flag indicating if NSFW content was detected.

### [cost](https://runware.ai/docs/models/openai-dalle-2#response-cost)

- **Type**: `float`

Task cost in USD. Present when `includeCost` is set to `true` in the request.

## Examples

### Origami Dragon Tea Garden (Text to Image)

![Origami Dragon Tea Garden](https://assets.runware.ai/examples/openai-dalle-2/591f1146-d3db-454a-8cb9-a3830a1b1c66.jpg)

**Request**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "b1e7a5fb-9f5f-4a62-9711-0d2cb889290f",
  "model": "openai:2@2",
  "positivePrompt": "A whimsical storybook tea garden at sunrise, centered on a giant origami dragon made of patterned paper and gold leaf, coiled around a circular koi pond. Porcelain teacups hang from flowering branches like lanterns, tiny guests in elegant vintage clothing sit at miniature tables on stepping stones, steam curls into the air forming delicate cloud shapes, scattered pastries and painted fans on the grass, willow trees and sculpted hedges framing the scene, intricate textures, soft warm light, rich pastel palette, magical realism, highly detailed illustration with crisp focus and graceful depth.",
  "width": 1024,
  "height": 1024
}
```

**Response**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "b1e7a5fb-9f5f-4a62-9711-0d2cb889290f",
  "imageUUID": "b4ae5e5a-ba58-46a9-b769-ca7f4822d938",
  "imageURL": "https://im.runware.ai/image/os/a05d22/ws/2/ii/b4ae5e5a-ba58-46a9-b769-ca7f4822d938.jpg",
  "cost": 0.02
}
```

---

### Volcanic Glass Violinist (Text to Image)

![Volcanic Glass Violinist](https://assets.runware.ai/examples/openai-dalle-2/fb209f54-89fb-4402-8fd6-a86cac10a129.jpg)

**Request**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "eafc3af1-908a-4aaa-a2bf-e10ff04769f1",
  "model": "openai:2@2",
  "positivePrompt": "A solitary violinist standing on a black sand shore beside a glowing lava river, the instrument sculpted from translucent volcanic glass with embers trapped inside, ash drifting through the air, distant basalt arches and steam plumes, the musician wearing layered wind-torn garments with copper embroidery, dramatic backlighting, rich orange and charcoal palette, highly detailed fantasy concept art, painterly textures, atmospheric depth, elegant composition, intricate reflections in the glass violin, epic yet melancholic mood",
  "width": 1024,
  "height": 1024
}
```

**Response**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "eafc3af1-908a-4aaa-a2bf-e10ff04769f1",
  "imageUUID": "120d9461-c2c1-4c5f-992f-745c1ffcb5b6",
  "imageURL": "https://im.runware.ai/image/os/a25d05/ws/2/ii/120d9461-c2c1-4c5f-992f-745c1ffcb5b6.jpg",
  "cost": 0.02
}
```

---

### Amber Salt Flats Regatta (Text to Image)

![Amber Salt Flats Regatta](https://assets.runware.ai/examples/openai-dalle-2/d672005d-ffd7-417d-b388-f38c6c1476a3.jpg)

**Request**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "87816c66-9c55-4f32-99da-18abb91e455f",
  "model": "openai:2@2",
  "positivePrompt": "A surreal regatta across vast amber salt flats at sunrise, where sleek wind-powered skiffs with stained-glass sails race over a mirror-smooth surface reflecting the sky; crews in layered linen and brass goggles lean into the wind, leaving delicate crystalline spray behind them. In the distance, colossal spiral rock formations rise from the flats, flocks of white ibis arc overhead, and temporary signal towers made of woven reeds and bright pennants mark the course. Rich warm golds, pale coral, and powder blue, ultra-detailed, imaginative environmental storytelling, crisp focus, elegant composition, painterly yet realistic textures, high-quality fantasy concept art.",
  "width": 1024,
  "height": 1024
}
```

**Response**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "87816c66-9c55-4f32-99da-18abb91e455f",
  "imageUUID": "e8df3d62-d826-4130-9160-98884ae3460e",
  "imageURL": "https://im.runware.ai/image/os/a11d13/ws/2/ii/e8df3d62-d826-4130-9160-98884ae3460e.jpg",
  "cost": 0.02
}
```

---

### Suspended Library of Kites (Text to Image)

![Suspended Library of Kites](https://assets.runware.ai/examples/openai-dalle-2/b92c2505-bfc9-4b0a-90fa-74d8149ee4b7.jpg)

**Request**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "78ecb629-2eb8-4912-a095-613097667dc2",
  "model": "openai:2@2",
  "positivePrompt": "A vast open-air library drifting above patchwork farmland, where giant handmade kites support wooden reading platforms with ropes and silk canopies. Shelves of weathered books hang between the kites, paper charms fluttering in the wind, ladders bridging from one airborne platform to another. Below, tiny orchards, winding footpaths, and reflective ponds form a geometric landscape. Golden afternoon light, soft clouds, whimsical fantasy illustration, intricate textures, delicate linework, painterly detail, warm color harmony, imaginative yet believable composition.",
  "width": 1024,
  "height": 1024
}
```

**Response**:

```json
{
  "taskType": "imageInference",
  "taskUUID": "78ecb629-2eb8-4912-a095-613097667dc2",
  "imageUUID": "d149db20-d866-4bb5-8e55-6f776d0830cf",
  "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/d149db20-d866-4bb5-8e55-6f776d0830cf.jpg",
  "cost": 0.02
}
```