--- description: One-click auto-enhance that analyzes an image and corrects exposure, contrast, white balance, saturation, and sharpness. --- # Image Enhancement {#image-enhancement} One-click auto-improve with smart analysis. Analyzes the image and applies exposure, contrast, white balance, saturation, sharpness, and denoising corrections. ## API Endpoint {#api-endpoint} `POST /api/v1/tools/image/image-enhancement` **Processing:** Synchronous (uses `createToolRoute` factory, returns result directly) **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). ## Parameters {#parameters} | 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) | ### Corrections Object {#corrections-object} | 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 | ## Example Request {#example-request} ```bash curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement \ -F "file=@photo.jpg" \ -F 'settings={"mode":"portrait","intensity":70,"corrections":{"exposure":true,"contrast":true,"sharpness":false}}' ``` ## Response (200 OK) {#response-200-ok} ```json { "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "downloadUrl": "/api/v1/download/{jobId}/photo.jpg", "originalSize": 300000, "processedSize": 310000 } ``` ## Analyze Endpoint {#analyze-endpoint} `POST /api/v1/tools/image/image-enhancement/analyze` Analyzes an image and returns correction recommendations without applying them. ### Parameters {#parameters-1} | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | file | file | Yes | Image file (multipart) | ### Example Request {#example-request-1} ```bash curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement/analyze \ -F "file=@photo.jpg" ``` ### Response (200 OK) {#response-200-ok-1} ```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" } } } ``` ## Notes {#notes} - 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.