Introduction

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 is made up of several APIs. Two of them are self-serve, available in two different plans, and cover most image editing needs.
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)Enterprise APIs
For more advanced needs, three additional APIs are available on Enterprise plans:
Visual Agent API: tailored AI workflows that create, check and fix product visuals at catalog scale, scoring every output against the original product. It's the best fit when producing an image takes several steps, or when your team checks AI visuals by hand today.
Visual QA API: automatically checks images, either to score how true an AI-edited product stays to the original (Product Fidelity), or to flag photos that were generated or edited with AI (AI Image Detection).
Video API: turns one or several product images into a video.
If you're interested in one of these APIs, please contact our team to book a demo.
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:
Background and scene
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 Relight (available in the Image Editing API)
Create Any Image (available in the Image Editing API)
Framing and geometry
Positioning (available in the Image Editing API)
Smart Cropping (available in the Image Editing API)
Perspective Correction (available in the Image Editing API, Enterprise plans only)
Image edits
AI Text Removal (available in the Image Editing API)
AI Uncrop (available in the Image Editing API)
AI Expand (available in the Image Editing API)
AI Upscale (available in the Image Editing API)
AI Beautifier (available in the Image Editing API)
Edit With AI (available in the Image Editing API)
Clothing and fashion
AI Ironing (available in the Image Editing API)
Virtual Model (available in the Image Editing API)
Virtual Try-On (available in the Image Editing API)
Flat Lay (available in the Image Editing API)
Ghost Mannequin (available in the Image Editing API)
Which use cases does the API enable?
Here are some of the use cases that the Photoroom API enables, grouped by industry.
This list is by no means exhaustive: the features above can be combined in many other ways to fit your own use case.
Food Delivery
Check that edited dishes stay true to the original, with no ingredients added or removed (Visual QA API, Visual Agent API)
Flag AI-generated or AI-edited photos submitted as proof in refund claims (Visual QA API)
Fashion & Apparel
Create listing images for clothing (tutorial), including Flat Lay and Ghost Mannequin images, and remove wrinkles with AI Ironing
Correct the perspective and rotation of garments photographed at an angle with Perspective Correction (examples)
Show garments on a Virtual Model, or let shoppers try them on with Virtual Try-On (tutorial)
Catch hallucinations on fine details such as logos, prints and labels (Visual QA API, Visual Agent API)
Create product videos from garment photos (Video API)
Marketplaces
Straighten photos of rectangular products such as trading cards with Perspective Correction (tutorial)
Flag AI-generated or AI-edited photos submitted as proof in return claims (Visual QA API)
E-commerce & Retail
Create product images that follow consistent brand guidelines (tutorial)
Create product images that comply with Google Shopping requirements (tutorial)
Turn product images into videos (Video API)
Automotive
Turn photos of a car into a video (Video API)
Creative Apps
Will the API make alterations to my products?
No, for most use cases the API will not make alterations to your products.
By default, the API will:
Remove the background of the original image to isolate its main subject.
Reposition and add effects around that main subject.
With this approach, it's simply not possible to introduce alterations, such as modifying a logo or a brand name.
The API does offer some features that can, however, introduce alterations.
Here's their exhaustive list.
Features that alter the framing or geometry of the image
No generative AI is involved, so hallucinations are impossible by design.
Positioning, which can crop the edges of the main subject when
scalingis set tofillSmart Cropping, which crops the original image around its main subject
Perspective Correction, which geometrically straightens products photographed at an angle, such as trading cards or garments
Features that alter the content of the image using an AI model
AI Relight and Green Screen Despill, which can alter colors
AI Text Removal, which removes text from the main subject
AI Upscale, which increases the resolution of the original image
AI Beautifier, which creates a re-imagined version of the main subject
Edit With AI, which edits the original image using an AI model
AI Ironing, Virtual Model, Virtual Try-On, Flat Lay, and Ghost Mannequin, which edit clothing images using an AI model
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.
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.
Use your API key: The key must be passed in the
x-api-keyHTTP header on every request.
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're all set to make your first API call!
From there, there are two ways to start using the API:
If you already know which feature you're looking for, then you can simply use the Try it now! button that's available on the documentation page of that feature:

If not, then you can use the search bar at the top of the documentation and simply describe the output that you want to achieve:

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:
Recommended workflows by use case
Before diving deeper into the details of the Photoroom API, we recommend reading the tutorials that best match your use cases.
Each tutorial contains tested parameter combinations that produce high-quality results.
Food Delivery
Fashion & Apparel
Marketplaces
E-commerce
Creative Apps
Last updated
Was this helpful?