Skip to main content

Relight API

The Relight API takes an image and applies natural lighting effects to make it appear more realistic. This is especially useful for refining generated or composited images with enhanced natural illumination.


Authentication

header
X-Photio-Key : {PHOTIO_API_KEY}

Do you not have an API key yet?

To call the API, you first need to obtain a Photio API key. To get your API key, go to the API Dashboard. After registering your card, you can use the issued API key.


Request Body

VariableTypeRequireDefaultDescription
imagestring-The image you want to apply relighting to. It can be either a base64-encoded PNG image or a URL. The input image should be a complete scene or a generated composite.
curl --request POST \
--url https://api.photio.io/v1/inference/relight \
--header 'X-Photio-Key: {X-Photio-Key}' \
--header 'Content-Type: application/json' \
--data '{ "image": "https://d2yiwnckkg6ukk.cloudfront.net/example/perfume_on_the_beach_output.png" }'

Body Example
{
"image": "https://d2yiwnckkg6ukk.cloudfront.net/example/perfume_on_the_beach_output.png"
}

Response

VariableTypeDescription
status_codeintIn the response, you can find a status value to check the status of the request. A normal response is indicated by 200, authentication issues by 401, and API status problems by a 500 error.
bodystringThe relighted image data is output as a Base64-encoded string.
Response Example
{
"status_code": 200,
"body": "Base64 String"
}

Output Example

Relight API Example Image