๐Ÿ‘‹ Welcome to the PhotoRoom API documentation.

The PhotoRoom API allows you to automatically remove backgrounds on any images.

While used by millions via the PhotoRoom mobile app, our API is still in its early days. If you have any questions on how it works, how to use it, and our pricing, please reach out to api-help@photoroom.com so we can help you out.

๐Ÿ”‘ย Get an API key

First, you need an API key to use this API. To do so:

๐Ÿ™Œย The generic way to call the API

Our background removal API is a web endpoint you can call from any programming language as long as it can send images as form data (just like with a regular form). The exact way to do so depends on the programming language of your choice.

๐Ÿ„โ€โ™‚๏ธย Performance recommendations

It's a good idea to resize images before sending them to our API to maximize the performance of your app. If you never expect to display images in 4000 x 4000 pixels then it's better to send us downsized images of 1500 x 1500 pixels for example. Do not send very small images though, our background removal algorithm works better with high-quality data.

Do a few tests to find the right compromise between precise background removal and performance for your users.

Finally, we're not yet optimizing PNGs, so it's also a good idea to optimize them on your side when you display them to your users. pngquant is a good candidate to automate this process.