Pixel Density (DPI)

The Image Editing API allows you to control the pixel density of the result image.

To control the pixel density, set the argument export.dpi to a value between 72 and 1200 (included).

Here's an example of an API call to get a result image with a pixel density of 300 dpi:

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: YOUR_API_KEY' \
  --form imageFile=@/path/to/image.jpg \
  --form export.dpi=300 \
  --output result-with-300-dpi.png

Last updated