2026-07-01 16:20:05 +08:00
---
description : One-click auto-enhance that analyzes an image and corrects exposure, contrast, white balance, saturation, and sharpness.
---
2026-07-11 13:01:55 +08:00
# Image Enhancement {#image-enhancement}
2026-06-08 11:52:28 +08:00
One-click auto-improve with smart analysis. Analyzes the image and applies exposure, contrast, white balance, saturation, sharpness, and denoising corrections.
2026-07-11 13:01:55 +08:00
## API Endpoint {#api-endpoint}
2026-06-08 11:52:28 +08:00
2026-06-21 00:12:59 +08:00
`POST /api/v1/tools/image/image-enhancement`
2026-06-08 11:52:28 +08:00
**Processing:** Synchronous (uses `createToolRoute` factory, returns result directly)
2026-07-06 08:09:22 +08:00
**Model bundle:** None required for basic enhancement. The `upscale-enhance` bundle (5-6 GB) is used only when `deepEnhance` is enabled (for AI noise removal via SCUNet).
2026-06-08 11:52:28 +08:00
2026-07-11 13:01:55 +08:00
## Parameters {#parameters}
2026-06-08 11:52:28 +08:00
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| file | file | Yes | - | Image file (multipart) |
| mode | string | No | `"auto"` | Enhancement mode: `auto` , `portrait` , `landscape` , `low-light` , `food` , `document` |
| intensity | number | No | `50` | Overall enhancement intensity (0-100) |
| corrections | object | No | all `true` | Selective corrections to apply (see below) |
| deepEnhance | boolean | No | `false` | Enable AI-powered noise removal (requires `noise-removal` tool installed) |
2026-07-11 13:01:55 +08:00
### Corrections Object {#corrections-object}
2026-06-08 11:52:28 +08:00
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| exposure | boolean | `true` | Auto-correct exposure |
| contrast | boolean | `true` | Auto-correct contrast |
| whiteBalance | boolean | `true` | Auto-correct white balance |
| saturation | boolean | `true` | Auto-correct saturation |
| sharpness | boolean | `true` | Auto-sharpen |
| denoise | boolean | `true` | Light denoising |
2026-07-11 13:01:55 +08:00
## Example Request {#example-request}
2026-06-08 11:52:28 +08:00
```bash
2026-06-21 00:12:59 +08:00
curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement \
2026-06-08 11:52:28 +08:00
-F "file=@photo.jpg" \
-F 'settings={"mode":"portrait","intensity":70,"corrections":{"exposure":true,"contrast":true,"sharpness":false}}'
```
2026-07-11 13:01:55 +08:00
## Response (200 OK) {#response-200-ok}
2026-06-08 11:52:28 +08:00
```json
{
"jobId" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
2026-06-17 17:13:31 +08:00
"downloadUrl" : "/api/v1/download/{jobId}/photo.jpg" ,
2026-06-08 11:52:28 +08:00
"originalSize" : 300000 ,
"processedSize" : 310000
}
```
2026-07-11 13:01:55 +08:00
## Analyze Endpoint {#analyze-endpoint}
2026-06-08 11:52:28 +08:00
2026-06-21 00:12:59 +08:00
`POST /api/v1/tools/image/image-enhancement/analyze`
2026-06-08 11:52:28 +08:00
Analyzes an image and returns correction recommendations without applying them.
2026-07-11 13:01:55 +08:00
### Parameters {#parameters-1}
2026-06-08 11:52:28 +08:00
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| file | file | Yes | Image file (multipart) |
2026-07-11 13:01:55 +08:00
### Example Request {#example-request-1}
2026-06-08 11:52:28 +08:00
```bash
2026-06-21 00:12:59 +08:00
curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement/analyze \
2026-06-08 11:52:28 +08:00
-F "file=@photo.jpg"
```
2026-07-11 13:01:55 +08:00
### Response (200 OK) {#response-200-ok-1}
2026-06-08 11:52:28 +08:00
```json
{
"corrections" : {
"exposure" : { "value" : 0.3 , "direction" : "brighten" },
"contrast" : { "value" : 0.2 , "direction" : "increase" },
"whiteBalance" : { "value" : 200 , "direction" : "warmer" },
"saturation" : { "value" : 0.1 , "direction" : "increase" },
"sharpness" : { "value" : 0.4 , "direction" : "sharpen" }
}
}
```
2026-07-11 13:01:55 +08:00
## Notes {#notes}
2026-06-08 11:52:28 +08:00
- This tool uses the synchronous `createToolRoute` factory, so it returns a standard response (not 202 async).
- The `mode` parameter adjusts how corrections are weighted (e.g., portrait mode is gentler on skin tones, landscape mode boosts saturation).
- When `deepEnhance` is enabled and the `noise-removal` tool (SCUNet) is installed, an additional AI denoising pass is applied after the standard corrections.
- The analyze endpoint is useful for previewing what corrections would be applied before committing.
- Supports HEIC/HEIF, RAW, TGA, PSD, EXR, and HDR input formats via automatic decoding.