Files
SnapOtter/apps/docs/tools/image/image-enhancement.md
T
SnapOtterandGitHub 00b651c9f8 feat(i18n): 21-language pipeline, landing/docs/API wiring, landing+API translations
Shared Claude Code translation pipeline (scripts/i18n, no API key) plus Astro/VitePress/Scalar i18n wiring. Landing and API reference translated into all 20 languages; docs i18n wiring + English source anchors. The translated docs markdown (apps/docs/<locale>/**, 3,620 files) follows in a companion PR because it exceeds GitHub's per-PR CI file limit.
2026-07-11 13:01:55 +08:00

3.6 KiB

description
description
One-click auto-enhance that analyzes an image and corrects exposure, contrast, white balance, saturation, and sharpness.

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/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

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

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

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)

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

Analyze Endpoint

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

Analyzes an image and returns correction recommendations without applying them.

Parameters

Parameter Type Required Description
file file Yes Image file (multipart)

Example Request

curl -X POST http://localhost:1349/api/v1/tools/image/image-enhancement/analyze \
  -F "file=@photo.jpg"

Response (200 OK)

{
  "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.