> For the complete documentation index, see [llms.txt](https://documentation.deep-image.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.deep-image.ai/image-processing/enhance-lighting-and-colors/advanced.md).

# Advanced

Generative tone correction with Flux Relight.

## Advanced

Advanced uses Flux Relight for generative lighting and color correction. It transfers changes to the original image while retaining its resolution.

### Request

Enable it with `generative_tone_correction`. Configure settings in `generative_tone_correction_parameters`.

```json
{
  "url": "image_url",
  "enhancements": ["generative_tone_correction"],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0.8,
    "contrast_strength": 0.8,
    "white_balance_strength": 0.9,
    "saturation_strength": 0.8,
    "light_transfer_strength": 0.4
  }
}
```

### Controls and API fields

<table><thead><tr><th width="138">Web control</th><th>API field</th><th width="98" align="right">Web default</th><th width="109" align="right">API default</th><th>Description</th></tr></thead><tbody><tr><td>Light transfer</td><td><code>light_transfer_strength</code></td><td align="right">40%</td><td align="right">0.4</td><td>Transfers broad illumination and the generated reference's global tone curve. It avoids copying texture or geometry. Values from 20%–40% (<code>0.2</code>–<code>0.4</code>) are usually safer.</td></tr><tr><td>Exposure</td><td><code>exposure_strength</code></td><td align="right">80%</td><td align="right">0.8</td><td>Controls transfer of the generated reference's overall brightness. It is a correction strength, not an exposure value in stops.</td></tr><tr><td>Contrast</td><td><code>contrast_strength</code></td><td align="right">80%</td><td align="right">0.8</td><td>Controls movement toward the reference's tonal range and contrast. With Light transfer enabled, it uses an edge-aware tone field to reduce texture amplification.</td></tr><tr><td>White balance</td><td><code>white_balance_strength</code></td><td align="right">90%</td><td align="right">0.9</td><td>Controls estimated color-temperature and tint correction. It does not set Kelvin or a fixed tint value.</td></tr><tr><td>Saturation</td><td><code>saturation_strength</code></td><td align="right">80%</td><td align="right">0.8</td><td>Controls color-intensity transfer toward the generated reference. A value of <code>0.0</code> does not convert the image to grayscale.</td></tr></tbody></table>

### Choose corrections

Set each strength between `0.0` and `1.0`. A value of `0.0` disables that component only.

* **Light only:** set `white_balance_strength` and `saturation_strength` to `0.0`.
* **Colors only:** set `light_transfer_strength`, `exposure_strength`, and `contrast_strength` to `0.0`.
* **Light and colors:** configure all five strengths.

The web percentage maps to API strength: `web percentage / 100`.

### Examples with Light transfer at 100%

Compare eight custom combinations on an interior, an e-commerce product photo, and a studio portrait against a black background. Each comparison shows the original on the left and the corrected image on the right. The source images are synthetic; the corrections were processed with Flux Relight. All corrected outputs retain the original 1024 × 768 resolution.

All eight examples use `light_transfer_strength: 1.0` (100%) and seed `42`. The other four strengths vary. These are custom examples, not named API presets or the default Natural Balance configuration.

Example 8 uses only full light transfer, with the other four strengths at zero. Compare it with examples 1–7 to see what the additional corrections change. Full light transfer already changes illumination and tonal structure, so another control can have a small effect or no effect on a particular scene.

| Example | Exposure | Contrast | White balance | Saturation | Light transfer |
| ------- | -------: | -------: | ------------: | ---------: | -------------: |
| 1       |      0.8 |      0.8 |           0.9 |        0.8 |            1.0 |
| 2       |      0.3 |     0.25 |          0.35 |       0.25 |            1.0 |
| 3       |      0.8 |      0.8 |           0.0 |        0.0 |            1.0 |
| 4       |      0.0 |      0.0 |           0.9 |        0.8 |            1.0 |
| 5       |      0.8 |      0.0 |           0.0 |        0.0 |            1.0 |
| 6       |      0.0 |      0.0 |           1.0 |        0.0 |            1.0 |
| 7       |      0.0 |      0.0 |           0.0 |        0.8 |            1.0 |
| 8       |      0.0 |      0.0 |           0.0 |        0.0 |            1.0 |

#### 1. Balanced correction + full light transfer

Full light transfer combined with exposure 80%, contrast 80%, white balance 90%, and saturation 80%.

![Original and corrected interior, product, and studio portrait — Balanced correction + full light transfer](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FZm1detJx2PycLbeEq9ZR%2Fportrait-example-01-natural-balance.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0.8,
    "contrast_strength": 0.8,
    "white_balance_strength": 0.9,
    "saturation_strength": 0.8,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

#### 2. Gentle corrections + full light transfer

Full light transfer combined with lower strengths for the other four corrections.

![Original and corrected interior, product, and studio portrait — Gentle corrections + full light transfer](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2F6L1nXpozyhmLSqd8efcq%2Fportrait-example-02-subtle.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0.3,
    "contrast_strength": 0.25,
    "white_balance_strength": 0.35,
    "saturation_strength": 0.25,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

#### 3. Light corrections + full light transfer

Full light transfer with exposure and contrast enabled; white balance and saturation transfer are disabled.

![Original and corrected interior, product, and studio portrait — Light corrections + full light transfer](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FfzT3jS5wTp7i0CzSC1ho%2Fportrait-example-03-light-only.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0.8,
    "contrast_strength": 0.8,
    "white_balance_strength": 0,
    "saturation_strength": 0,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

#### 4. Color corrections + full light transfer

Full light transfer with white balance and saturation enabled; additional exposure and contrast corrections are disabled.

![Original and corrected interior, product, and studio portrait — Color corrections + full light transfer](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FmMZfuKaG2uCa2tyG3nyX%2Fportrait-example-04-colors-only.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0,
    "contrast_strength": 0,
    "white_balance_strength": 0.9,
    "saturation_strength": 0.8,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

#### 5. Exposure + full light transfer

Full light transfer with exposure correction; contrast, white balance, and saturation transfer are disabled.

![Original and corrected interior, product, and studio portrait — Exposure + full light transfer](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2F7KaVdqgW5hSLHwsnt5ZS%2Fportrait-example-05-exposure-only.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0.8,
    "contrast_strength": 0,
    "white_balance_strength": 0,
    "saturation_strength": 0,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

#### 6. White balance + full light transfer

Full light transfer with white balance correction; exposure, contrast, and saturation transfer are disabled.

![Original and corrected interior, product, and studio portrait — White balance + full light transfer](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FwkoaI9xhrBq29D1NtQ50%2Fportrait-example-06-white-balance-only.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0,
    "contrast_strength": 0,
    "white_balance_strength": 1.0,
    "saturation_strength": 0,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

#### 7. Saturation + full light transfer

Full light transfer with saturation correction; exposure, contrast, and white balance transfer are disabled.

![Original and corrected interior, product, and studio portrait — Saturation + full light transfer](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FedCDTEf0j3hJIUW7I0WA%2Fportrait-example-07-saturation-only.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0,
    "contrast_strength": 0,
    "white_balance_strength": 0,
    "saturation_strength": 0.8,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

For this set, the interior and product results are pixel-identical to example 8. The portrait differs. Saturation strength controls correction toward the generated reference; it does not guarantee a visible saturation change on every image.

#### 8. Full light transfer only

Full light transfer with all four additional correction strengths disabled. Use this as the baseline for the other seven combinations.

![Original and corrected interior, product, and studio portrait — Full light transfer only](https://2652559519-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3i5YcUkcXyIsWHIhRO2d%2Fuploads%2FEphzfjrrQUIua88i5FTT%2Fportrait-example-08-light-transfer-only.jpg?alt=media)

```json
{
  "url": "image_url",
  "enhancements": [
    "generative_tone_correction"
  ],
  "generative_tone_correction_parameters": {
    "exposure_strength": 0,
    "contrast_strength": 0,
    "white_balance_strength": 0,
    "saturation_strength": 0,
    "light_transfer_strength": 1.0,
    "seed": 42
  }
}
```

### Auto Enhance preset

```json
{
  "url": "image_url",
  "preset": "auto_enhance_tone_correction"
}
```

This preset combines denoise, face enhancement, and Natural Balance correction. The legacy `auto_enhance` preset remains available.
