Who is this API for?

The Image Editing API enables anyone to easily create high-quality images.

This is what a typical call to this API will look like:

curl 'https://image-api.photoroom.com/v2/edit?background.color=ffffff&maxHeight=500&maxWidth=500&imageUrl=IMAGE_URL_GOES_HERE' \
  --header 'x-api-key: API_KEY_GOES_HERE' \
  -o output.png

If you don't have an apiKey, here are the steps to create yours.

As you can see, all the edits that will be applied to the image are defined in the URL.

This means that the URL is the entire source of truth of the API call.

It’s a very powerful approach because:

  • you can see at a glance what the API call will do

  • you can add, remove, or change the value of arguments at will

  • you can be confident that the same URL will always yield the same result

Additionally, the API call will return the result image in binary format.

This is also very powerful because it means that you can use the URL of the API call in any place that expects the URL of an image.

Last updated