Skip to main content
POST
Image editing
Generate an edited version based on a source image (with an optional mask), for tasks like removal, outpainting and style transfer.

Request

Parameters

Response

Python example

Making a mask

  • The mask must be the same size as the source + a PNG alpha channel.
  • Transparent pixels mark the area the model is allowed to repaint.
  • Opaque pixels mark the area that must stay as the original.
  • You can create it with Photoshop / GIMP / PIL.

Multi-image blending (gpt-image-1)

gpt-image-1 supports using multiple images as input references: