Photoroom API Documentation
Ask or search…
K

AI Relighting

If the subject of your image has been underexposed or overexposed, the Image Editing API enables you to fix this issue by re-lighting the subject.
To re-light the subject of an image, set the argument lighting.mode=ai.auto.
Re-lighting is a compute-intensive process: you can expect the API call to typically take between 5 and 10 seconds to complete.
Here are some example of what re-lighting can achieve:
Original
Re-lighted
If you want to give it a try, here's the code to reproduce the examples above:
curl 'https://beta-sdk.photoroom.com/v2/edit?referenceBox=originalImage&maxWidth=2000&maxHeight=2000&removeBackground=false&lighting.mode=ai.auto&imageUrl=URL_OF_YOUR_IMAGE' \
--header 'x-api-key: YOUR_API_KEY' \
--output with-re-lighting.png
Please note that re-lighting is currently limited to images with a maximum size of 10MB.
The re-lighting will only be applied to the subject of the image: when using the argument removeBackground=false, please note that the background will not be re-lighted.