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.
API Options
Platform-level options for task execution and delivery.
-
taskType
string required value: imageInference -
Identifier for the type of task being performed
-
taskUUID
string required UUID v4 -
UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.
-
outputType
string default: URL -
Image output type.
Allowed values 3 values
-
outputFormat
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.
**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 3 values
-
outputQuality
integer min: 20 max: 99 default: 95 -
Compression quality of the output. Higher values preserve quality but increase file size.
-
webhookURL
string 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 PLATFORM
- Webhooks
-
deliveryMethod
string default: sync -
Determines how the API delivers task results.
Allowed values 2 values
- Returns complete results directly in the API response.
- Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.
Learn more 1 resource
- Task Polling PLATFORM
-
uploadEndpoint
string 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.
// 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.jpgThe content data will be sent as the request body to the specified URL when generation is complete.
-
safety
object -
Content safety checking configuration for image generation.
Properties 2 properties
-
safety»checkContentcheckContent
boolean default: false -
Enable or disable content safety checking. When enabled, defaults to
fastmode.
-
safety»modemode
string default: none -
Safety checking mode for image generation.
Allowed values 2 values
- Disables checking.
- Performs a single check.
-
-
ttl
integer min: 60 -
Time-to-live (TTL) in seconds for generated content. Only applies when
outputTypeisURL.
-
includeCost
boolean default: false -
Include task cost in the response.
-
numberResults
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
string required value: openai:2@2 -
Identifier of the model to use for generation.
Learn more 3 resources
-
positivePrompt
string required min: 1 max: 1000 -
Text prompt describing elements to include in the generated output.
Learn more 2 resources
-
Width of the generated media in pixels.
Learn more 2 resources
-
Height of the generated media in pixels.
Learn more 2 resources
Origami Dragon Tea Garden
{
"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
}{
"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
{
"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
}{
"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
{
"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
}{
"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
{
"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
}{
"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
}