Skip to main content
The inpaint API removes the areas marked on a mask and fills them in seamlessly to match the surrounding image. Mark what to remove in white and leave the rest black. The result keeps the dimensions and format of the input image.

Modes

  • fast (default, 5 credits): quickest results at the lowest cost
  • generative (10 credits): higher-quality fill with more realistic detail

What to build with it

  • Remove anything unwanted from photos
  • Clean up product shots before listing them
  • Let users brush over anything in your editor and erase it

Tips

  • Cover the whole area you want removed plus a few pixels of margin, including any shadow or reflection
  • Start with fast, and use generative when you want a more detailed, realistic fill
  • Draw the mask on the image as it is displayed, so a rotated phone photo and its mask line up

Limitations

  • The mask must have the same dimensions as the input image and contain at least some white
  • Mask transparency is ignored; only the color of each pixel counts
  • If a fast result looks soft, try generative
  • The inpaint API removes what you mark; it does not add new content from a prompt