HD Background Removal

Using HD Background Removal is recommended when you want to remove the background of a high-resolution image (≥ 2K) to get more detailed subject edges:

To enable the feature, add this HTTP header to your API call: pr-hd-background-removal: auto

If you want to give it a try, here's the code to reproduce the example above:

curl --location 'https://image-api.photoroom.com/v2/edit' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'pr-hd-background-removal: auto' \
  --form imageFile=@/absolute/path/to/image.jpg \
  --form referenceBox=originalImage \
  --output result-hd-background-removal.png

Here are several examples of what HD Background Removal can achieve:

Don't hesitate to download the images locally and zoom on the edges to better see the difference.

(original image)
(without HD Background Removal)
(with HD Background Removal)

Last updated

Was this helpful?