Skip to content

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

POST /api/v1/tools/image-enhancement

Processing: Synchronous (uses createToolRoute factory, returns result directly)

Model bundle: None required for basic enhancement. The upscale-enhance bundle (4-5 GB) is used only when deepEnhance is enabled (for AI noise removal via SCUNet).

Parameters

ParameterTypeRequiredDefaultDescription
filefileYes-Image file (multipart)
modestringNo"auto"Enhancement mode: auto, portrait, landscape, low-light, food, document
intensitynumberNo50Overall enhancement intensity (0-100)
correctionsobjectNoall trueSelective corrections to apply (see below)
deepEnhancebooleanNofalseEnable AI-powered noise removal (requires noise-removal tool installed)

Corrections Object

FieldTypeDefaultDescription
exposurebooleantrueAuto-correct exposure
contrastbooleantrueAuto-correct contrast
whiteBalancebooleantrueAuto-correct white balance
saturationbooleantrueAuto-correct saturation
sharpnessbooleantrueAuto-sharpen
denoisebooleantrueLight denoising

Example Request

bash
curl -X POST http://localhost:13490/api/v1/tools/image-enhancement \
  -F "[email protected]" \
  -F 'settings={"mode":"portrait","intensity":70,"corrections":{"exposure":true,"contrast":true,"sharpness":false}}'

Response (200 OK)

json
{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/{jobId}/photo_enhanced.jpg",
  "originalSize": 300000,
  "processedSize": 310000
}

Analyze Endpoint

POST /api/v1/tools/image-enhancement/analyze

Analyzes an image and returns correction recommendations without applying them.

Parameters

ParameterTypeRequiredDescription
filefileYesImage file (multipart)

Example Request

bash
curl -X POST http://localhost:13490/api/v1/tools/image-enhancement/analyze \
  -F "[email protected]"

Response (200 OK)

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

  • 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.