Photoroom API Documentation
Ask or search…
K

Which endpoints are available?

The Image Editing API exposes two endpoints.

GET endpoint

GET https://beta-sdk.photoroom.com/v2/edit
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:
curl 'https://beta-sdk.photoroom.com/v2/edit?shadow.mode=ai.soft&background.color=FFFFFF&padding=0.1&imageUrl=URL_OF_YOUR_IMAGE' \
--header 'x-api-key: YOUR_API_KEY' \
--output result-get-endpoint.png
The full API reference documentation of this endpoint is available here

POST endpoint

POST https://beta-sdk.photoroom.com/v2/edit
The POST endpoint allows you to:
  • directly upload an image file, through the argument imageFile
  • configure 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:
curl --request POST \
--url https://beta-sdk.photoroom.com/v2/edit \
--header 'Accept: image/png, application/json' \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: YOUR_API_KEY' \
--form imageFile=@/absolute/path/to/image.jpg \
--form shadow.mode=ai.soft \
--form background.color=FFFFFF \
--form padding=0.1 \
--output result-post-endpoint.png
The full API reference documentation of this endpoint is available here