Introduction
You can download the API Reference (OpenAPI specification), which contains the full list of endpoints, parameters and authentication here.
How does the API work?
The Photoroom API enables you to easily create high-quality images.
It allows you to separate a subject from its background, re-light this subject, add a realistic shadow, generate a new background, resize to given requirements, and more.
Our models are specialized in photo editing using AI.
The API was designed with the goal of being extremely easy to use and integrate.
All endpoints follow the same logic: they take an image as their input, apply edits to it, and return their result as a new edited image.
Which API should I use?
The Photoroom API consists of two API endpoints, which are available in two different plans.
If you want to apply edits to your image, such as resizing, replacing the background, re-lighting the subject or adding a realistic shadow, then you'll want to call the Image Editing API:
Image Editing API (Plus plan)However, if you only need to remove the background from an image and don't need to perform any additional edits, then you'll want to call the Remove Background API:
Remove Background API (Basic plan)Please keep in mind that 1 call to the Image Editing API is worth 5 calls to the Remove Background API.
More details about how API calls are billed is available here.
Which AI features are available in the API?
The Photoroom API enables you to create great looking images through a collection of state-of-the-art AI features.
Here's a list of all the AI features that are available in the Photoroom API:
AI Background Removal (available in both the Remove Background API and the Image Editing API)
AI Shadows (available in the Image Editing API)
AI Backgrounds (available in the Image Editing API)
AI Relighting (available in the Image Editing API)
AI Text Removal (available in the Image Editing API)
AI Expand (available in the Image Editing API)
AI Beautifier (abailable in the Image Editing API)
AI Uncrop (available in the Image Editing API)
AI Upscale (available in the Image Editing API)
Create Any Image (available in the Image Editing API)
Describe Any Change (available in the Image Editing API)
How can I get my API key?
In order to use the Photoroom API, you'll first need to activate the API for your account and obtain your unique API key. Here's how to do it:
Activate the API for your account: This can be done by visiting your account settings on the Photoroom website. Make sure that you're logged into your account.
We recommend that you use a generic email address (e.g. [email protected]) to create the Photoroom account that will own your API key.
Not using a personal email address (e.g. [email protected]) allows you to retain ownership over your details and API key(s) even if members of your team leave your organization.
Copy your API key: Once you've activated the API for your account, you'll be provided with a unique API key. This key is essentially your password to make API calls, so it's important to keep it safe and secure. You can retrieve your API key by following the same link used for the activation.
Keep in mind that your API key is tied to your account and should be kept secret. It should not be shared publicly or with others.
If you believe your API key has been compromised, you can revoke it yourself on the API dashboard and create a new one. If you need more help or believe your key has been used maliciously, you can contact our support for assistance.
If you have multiple teams or applications, you can create multiple API keys in your account settings and use one key per use case. For example, you can have separate keys for your development and production environments, or create keys for individual services.
How do I make my first API call?
Once you've created your API key, you are ready to make your first API call!
The easiest way to make your first API call is to use the sandbox mode of the Image Editing API.
How do I make my first call?Sandbox mode enables you to make free API calls and doesn't require purchasing a subscription.
How do I integrate the API into my project?
The Photoroom API uses standard HTTP calls, which makes it easy to integrate with any programming language or networking framework.
For the Remove Background API, we provide API wrappers for JavaScript, Python, Node.js, and iOS.
For the Remove Background API and the Image Editing API, we also provide integration tutorials that explain how to process images from:
Last updated
Was this helpful?