# Relight Image

Try out this capability in Bria's sandbox

Description

Modify the lighting setup (direction and atmosphere) of an image.

Example:

* Light Type: "spotlight on subject, keep background settings"


  
    Input Image
    Output Image

Endpoint: POST /relight

## Header parameters:

  - `api_token` (string, required)

## Request fields (application/json):

  - `image` (string, required)
    The source image to be handled by the API.  
Supported input types:  
- Base64-encoded string - URL pointing to an image file that is publicly accessible and available at the time of processing.  

Accepted formats: JPEG, JPG, PNG, WEBP.

  - `light_direction` (string)
    Direction (e.g., "front", "side", "top-down").
    Enum: "front", "side", "bottom", "top-down"

  - `light_type` (string, required)
    Type (e.g., "sunset", "studio", "neon").
    Enum: "midday", "blue hour light", "low-angle sunlight", "sunrise light", "spotlight on subject, keep background settings", "overcast light", "soft overcast daylight lighting", "cloud-filtered lighting", "fog-diffused lighting", "moonlight lighting", "starlight lighting nighttime", "soft bokeh lighting", "harsh studio lighting keep background setting"

## Response 200 fields (application/json):

  - `result` (object, required)

  - `result.image_url` (string, required)

  - `result.seed` (integer, required)

  - `result.structured_instruction` (string, required)

  - `request_id` (string, required)

  - `warning` (string)
    Returned only when ip_signal = true and the instruction field included IP content.

## Response 202 fields (application/json):

  - `request_id` (string, required)

  - `status_url` (string, required)

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 123

  - `error.message` (string, required)

  - `error.details` (string, required)

  - `request_id` (string, required)


