xtract.bot
POST /api/image-quantize

Quantize an image to N colours. Useful for retro / 8-bit / GIF-style effects, palette extraction, and low-bandwidth previews.

Reduces an image to a small fixed-size palette of colours. `paletteSize` (default 16) controls how many colours. Useful for retro / 8-bit / GIF-style effects, low-bandwidth previews, and "this looks like Mario" stylisation.

Inputs

NameTypeDefaultDescription
image*fileInput image (PNG / JPEG / WebP).
numColorsnumber (2…256)16Palette size after quantization.
ditherenum (none | fs | floyd | riemersma)"none"Dither algorithm. `none` = crisp pixel-art look.
formatenum (png | jpeg | webp)Output format (defaults to input).

Response

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