OpenAI Images / DALL·E 2 / Image edit
openai_image/dall-e-2/image_edit
Async
Edit an existing image guided by a prompt (gpt-image-1 and dall-e-2).
Parameters
| Name | Type | Required | Description | Allowed values | Bundle dim. |
|---|---|---|---|---|---|
| mask | string | no | Optional PNG mask URL. Transparent pixels mark the edit region. | — | — |
| mode | string | no | Quality tier. gpt-image-2 and gpt-image-1: low | medium | high | auto. dall-e-3: standard | hd. dall-e-2: ignored. | auto, low, medium, high, standard, hd | — |
| prompt | string | yes | Text prompt describing the desired output. | — | — |
| resolution | string | no | Output size. gpt-image-2: 1024x1024 | 1024x1536 | 1536x1024 | 2048x2048 | 3840x2160 | 2160x3840 | auto. gpt-image-1: 1024x1024 | 1024x1536 | 1536x1024 | auto. dall-e-3: 1024x1024 | 1024x1792 | 1792x1024. dall-e-2: 256x256 | 512x512 | 1024x1024. | auto, 256x256, 512x512, 1024x1024, 1024x1536, 1536x1024, 1024x1792, 1792x1024, 2048x2048, 3840x2160, 2160x3840 | — |
| aspect_ratio | string | no | Cosmetic; OpenAI selects rendering size from `resolution`. | 1:1, 3:4, 4:3, 9:16, 16:9 | — |
| callback_url | string | no | Webhook URL invoked when async task completes. | — | — |
| images_count | integer | no | Number of images to generate. dall-e-3 must be 1. | — | — |
| input_images | string[] | yes | Source images. dall-e-2 accepts exactly one PNG; gpt-image-1 supports up to 6 inputs for composite edits; gpt-image-2 raises the cap to 16. | — | — |
Example request
{
"provider": "openai_image",
"model": "dall-e-2",
"method": "image_edit",
"params": {
"mode": "medium",
"prompt": "Replace the sky with a dramatic thunderstorm",
"resolution": "1024x1024",
"input_images": [
"https://example.com/landscape.png"
]
}
}Example response
null