Sandbox Mode

You can make up to 1,000 free calls by month to the Image Editing API using sandbox mode.

Sandbox mode is meant to be used for testing and prototyping, and will produce an image with a watermark.

All the features of the Image Editing API are available in sandbox mode, including AI features such as AI Backgrounds or AI Shadows.

To use sandbox mode, prepend sandbox_ to your API key. (Example: sandbox_xxxxxxxxxxxxxxxx)

curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'Accept: image/png, application/json' \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-api-key: sandbox_xxxxxxxxxxxxxxxx' \
  --form imageFile=@/path/to/image.jpg \
  --form shadow.mode=ai.soft \
  --form background.color=FFFFFF \
  --form padding=0.1 \
  --output result-sandbox-mode.png

(original image)

regular API call

sandbox mode API call

Sandbox mode is currently only supported by the Image Editing API, it will not work with the Remove Background API.

Last updated