How do I make my first call?

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

curl -H 'x-api-key: YOUR_API_KEY' \
  -f https://sdk.photoroom.com/v1/segment \
  -F 'image_file=@/absolute/path/to/image.jpg' \
  -o photoroom-result.png

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

Last updated

Was this helpful?