Quickstart Guide

Who is this API for?

The Remove Background API allows you to isolate the subject of an image by removing the background of the image.

Using this API is appropriate if you only need to remove the background of your image, and don't need to perform any additional edits.

The quality of the background removal will be the same than that of the Image Editing API.

However, because this API only performs background removal, its response time will be faster. Data on median and p90 response times is available here.

For additional information about the important features to look for in image background removal technology, you can consult this blog article.

How do I make my first API call?

To call the Remove Background API and remove the background of an image, you can run the following code in your terminal:

curl --request POST \
  --url https://sdk.photoroom.com/v1/segment \
  --header 'x-api-key: YOUR_API_KEY' \
  --form image_file=@/path/to/your/image.jpg \
  --output photoroom-result.png

If you don't have an API key, here are the steps to create yours.

To go further, you can visit the API Reference to learn about all the available parameters (format, channels, bg_color, size, crop).

Will the API make alterations to my products?

No, the Remove Background API will only remove the background and will not make any change to the actual pixels of the original image.

Consequently, it cannot make alterations to your products, such as modifying a logo or a brand name.

Please note that the feature Green Screen Despill can, however, alter colors.

Last updated

Was this helpful?