OpenAI/gpt-image-2-edit/Released Apr 2026

GPT Image 2 Edit

4K image editing from text

Commercial use
Image

About GPT Image 2 Edit

GPT Image 2 Edit is OpenAI's image editing model. It transforms one or more reference images using a text prompt, supporting multi-image composition and accurate preservation of subject identity, text, and layout. Ideal for photo modifications, style transfer, composition changes, and product mockups.

Ready to build with GPT Image 2 Edit?

Try GPT Image 2 Edit in the Workbench to prompt it, compare outputs, and iterate on prompts without writing any code. When you're ready to ship, call the same model from our API and build your own apps on top of it.

curl -sSf -X POST https://hub.oxen.ai/api/ai/images/edit \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $OXEN_API_KEY" \
    -d '{
  "model": "gpt-image-2-edit",
  "prompt": "Place the subject from @Image1 on the surface of the moon with Earth rising in the background, photorealistic, cinematic lighting.",
  "input_image": [
    "https://hub.oxen.ai/api/repos/ox/Oxen-AI-Assets/file/main/images/ox_zoom_out_1926_1076.png"
  ],
  "aspect_ratio": "16:9",
  "resolution": "2K",
  "quality": "high",
  "output_format": "png"
}'

Request parameters

Every field GPT Image 2 Edit accepts in the request body. See the API reference for response formats.

POSThttps://hub.oxen.ai/api/ai/images/edit
FieldTypeRequiredDefaultDescription
promptstringYes
—
Text description of how to edit the input image(s). Use @Image1, @Image2, etc. to reference the input images.
input_imagearray<string>
nullable
Yes
—
One or more reference images to transform. Reference them in the prompt as @Image1, @Image2, etc.
mask_urlstring
uri · nullable
No
—
Optional mask image URL. White pixels mark regions to edit; black pixels are preserved. Leave empty to edit the whole image.
aspect_ratiostringNo"16:9"
auto1:116:99:164:33:43:22:321:99:21
resolutionstringNo"2K"
1K2K
qualitystringNo"high"Output quality tier. Use 'auto' to let the model pick, or set explicitly to low, medium, or high.
autolowmediumhigh
output_formatstringNo"png"File format for the generated image.
pngjpegwebp
image_sizeobjectNo
—
Pixel dimensions sent to fal, derived from aspect_ratio and resolution.