Background Removal Model Versioning

Currently, two background removal models are available in the Image Editing API.

To select a background removal model, set the header pr-background-removal-model-version to either:

  • 2023-06-01 (the default model)

  • 2024-09-26

When the header pr-background-removal-model-version is not explicitly set, its value is considered to be set to default .

Here's an example of a call that selects the model 2024-09-26:

curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'pr-background-removal-model-version: 2024-09-26' \
  --form imageFile=@/absolute/path/to/image.jpg \
  --output result.png

Which model should I use?

The more recent the model is, the better it will be at background removal.

If you're starting to integrate the Image Editing API, we recommend that you use the more recent model (2024-09-26).

However, if you have already integrated the Image Editing API, you need to be aware that for images with a high uncertainty score, the more recent model (2024-09-26) can make a different choice in the object(s) it will keep:

That's the reason why we're keeping the previous model (2023-06-01) available for a limited amount of time.

We strongly recommend that you test your integration with the new model (2024-09-06), to make sure that its changes are not breaking your workflow.

(You can use our Sandbox mode in order to make free API calls during your tests)

Comparison between the models

Here are some comparisons between the two background removal models:

Don't hesitate to click on the images to see them in full resolution.

(a grey background has been added to make small details easier to see)

Last updated