xtract.bot
POST /api/image-auto-enhance

Auto-enhance a photo: stretch the histogram, normalize contrast, and optionally sharpen. The "I feel lucky" button for quick image cleanup.

Applies a quick tonal correction to a photo: stretches the histogram so the brightest pixel becomes white and the darkest becomes black, then normalises contrast. Useful as a baseline pass on user-uploaded photos that look flat or hazy. Not a replacement for proper editing, but a sensible default when you cannot ask the user to do it themselves.

Inputs

NameTypeDefaultDescription
image*fileInput image bytes.
claheClipLimitnumber (0.5…10)2CLAHE clip limit (higher = stronger contrast).
sharpenStrengthnumber (0…4)1Unsharp mask strength (0 disables).
saturationBoostnumber (0.5…2)1.05Multiplier on chroma channels (1 = no change).
formatenum (jpeg | png)"jpeg"Output encoding.
qualitynumber (1…100)90JPEG quality.

Response

Modes: binary, json. Cache: yes (24h TTL).