Quickstart Guide
Here's a walkthrough of the latest API features:
Who is this API for?
The Image Editing API enables anyone to easily create high-quality images.
This is what a typical call to the API looks like:
If you don't have an API key, here are the steps to create yours.
And these are examples of results that this API call produces:
(original image)
(result image)






Let's go over the parameters of this API call.
imageFile=@/absolute/path/to/image.jpg
imageFile=@/absolute/path/to/image.jpgThis parameter represents the input image that you want to edit.
This image can be provided either:
as a file, using the parameter
imageFileas a URL, using the parameter
imageUrl
More details about maximum file size, resolution and image formats are available here.
removeBackground=true
removeBackground=trueThis parameter specifies that the background of the input image should be removed.
removeBackground is set to true by default, so you can omit it when you want the background to be removed
background.color=FFFFFF
background.color=FFFFFFThis parameter creates a new background that consists of a white solid color.
Alternatively to using a solid color, you can also opt for:
having a transparent background (this is this the default behavior)
using a static image
creating an AI Background
padding=0.15
padding=0.15This parameter adds 15% of padding around the subject, for a more visually pleasing result.
The positioning of the subject in the result image is fully customizable, you can read more about it here.
shadow.mode=ai.soft
shadow.mode=ai.softThis parameter adds a realistic shadow to the subject, which helps the result image look more natural.
The look of the shadow can be customized, you can read more about it here.
How do I configure my first API call?
We designed the Image Editing API so that it’s both very powerful and very easy to use.
To get started, you can use the website https://try-api.photoroom.com/ to prototype an API call and immediately try it on your own images:

We recommend that you also use the Try it now! buttons that are available throughout this documentation: they will open this website with the corresponding API call already pre-configured.
To read more about each attribute available for the API endpoint, please have a look at our API reference documentation.
Which endpoints are available?
The Image Editing API exposes two endpoints.
GET endpoint
The GET endpoint expects you to:
configure the edits you want to apply through query string arguments
provide the input image as a URL, through the argument
imageUrl
This means that the images you process through that endpoint must already be hosted on the Internet.
Here's an example of an API call made using the GET endpoint:
The full API reference documentation of this endpoint is available here
POST endpoint
The POST endpoint allows you to:
directly upload an image file, through the argument
imageFileconfigure the edits through the body of the request rather than the query string
Here's an example of an API call made using the POST endpoint:
The full API reference documentation of this endpoint is available here
Will the API make alterations to my products?
No, for most use cases the Image Editing 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 Image Editing API does offer some features that can, however, introduce alterations.
Here's their exhaustive list:
AI Relight, which can alter colors
AI Text Removal, which removes text from the main subject
AI Beautifier, which creates a re-imagined version of the main subject
AI Upscale, which increases the resolution of the original image
Describe Any Change, which edits the original image using an AI model
If you use one of these features and product accuracy is important for you, then we recommend that you have a human validation of the images produced by the API.
Last updated
Was this helpful?