AigenwayDocumentation

OpenAI Images / GPT Image 1 / Image edit

openai_image/gpt-image-1/image_edit
Async

Edit an existing image guided by a prompt (gpt-image-1 and dall-e-2).

Parameters

NameTypeRequiredDescriptionAllowed valuesBundle dim.
maskstringnoOptional PNG mask URL. Transparent pixels mark the edit region.
modestringnoQuality 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
promptstring
yes
Text prompt describing the desired output.
resolutionstringnoOutput 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_ratiostringnoCosmetic; OpenAI selects rendering size from `resolution`.1:1, 3:4, 4:3, 9:16, 16:9
callback_urlstringnoWebhook URL invoked when async task completes.
images_countintegernoNumber of images to generate. dall-e-3 must be 1.
input_imagesstring[]
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": "gpt-image-1",
  "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
Pricing: see your dashboard (auth required).