---
title: "Relight an image"
method: POST
path: "/proxy/freepik/v1/ai/image-relight"
tags: ["Freepik", "Proxy"]
---

# Relight an image

`POST /proxy/freepik/v1/ai/image-relight`

Relight an image using AI. This endpoint accepts a variety of parameters to customize the generated images.

## Request body

- FreepikMagnificRelightRequest
  - `advanced_settings` object
    - `blacks` integer — Adjust the level of black color in the image.
    - `brightness` integer — Adjust the level of brightness in the image.
    - `contrast` integer — Adjust the level of contrast in the image.
    - `engine` 'automatic' | 'balanced' | 'cool' | 'real' | 'illusio' | 'fairy' | 'colorful_anime' | 'hard_transform' | 'softy' — Engine preset for relighting: - balanced: Well-rounded, general-purpose option - cool: Brighter with cooler tones - real: Aims to enhance photographic quality (Experimental) - illusio: Optimized for illustrations and drawings - fairy: Suited for fantasy-themed images - colorful_anime: Ideal for anime, cartoons, and vibrant colors - hard_transform: Significantly alters the original image - softy: Slightly softer effect, suitable for graphic designs
    - `fixed_generation` boolean — When enabled, using the same settings will consistently produce the same image.
    - `saturation` integer — Adjust the level of saturation in the image.
    - `transfer_light_a` 'automatic' | 'low' | 'medium' | 'normal' | 'high' | 'high_on_faces' — Adjusts the intensity of light transfer.
    - `transfer_light_b` 'automatic' | 'composition' | 'straight' | 'smooth_in' | 'smooth_out' | 'smooth_both' | 'reverse_both' | 'soft_in' | 'soft_out' | 'soft_mid' | 'strong_mid' | 'style_shift' | 'strong_shift' — Also modifies light transfer intensity. Can be combined with transfer_light_a for varied effects.
    - `whites` integer — Adjust the level of white color in the image.
  - `change_background` boolean — When enabled, changes the background based on prompt and/or reference image. Useful for product placement and portraits.
  - `image` string, required — Base64 or URL of the image to do the relight
  - `interpolate_from_original` boolean — When enabled, makes the final image interpolate from the original using the light transfer strength slider.
  - `light_transfer_strength` integer — Level of light transfer intensity. 0% keeps closest to original, 100% is maximum transfer.
  - `preserve_details` boolean — Maintains texture and small details of the original image. Good for product photography, texts, etc.
  - `prompt` string — You can guide the generation process and influence the light transfer with a descriptive prompt. IMPORTANT: You can emphasize specific aspects of the light in your prompt by using a number in parentheses, ranging from 1 to 1.4, like "(dark scene:1.3)".
  - `style` 'standard' | 'darker_but_realistic' | 'clean' | 'smooth' | 'brighter' | 'contrasted_n_hdr' | 'just_composition' — Style preset for the relight operation.
  - `transfer_light_from_lightmap` string — Base64 or URL of the lightmap for light transfer. Incompatible with 'transfer_light_from_reference_image'
  - `transfer_light_from_reference_image` string — Base64 or URL of the reference image for light transfer. Incompatible with 'transfer_light_from_lightmap'
  - `webhook_url` string, uri — Optional callback URL that will receive asynchronous notifications whenever the task changes status.

## Response `200`

OK - The relight process has started

- FreepikTaskResponse
  - `data` FreepikTaskData, required
    - `generated` string[] — URLs to the generated images.
    - `status` 'CREATED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED'
    - `task_id` string, uuid

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.dev/ac/apis/comfy-api.md) · [All operations](https://skmtc.dev/ac/apis/comfy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ac/comfy-api/revisions/c1893dffe250/schema)
