API & MCP
Everything a person can do on Retro Dither & Machine Palette Converter, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://fliplineditherlab.usefulweb.app/api/v1/calculate– run Retro Dither & Machine Palette ConverterGET https://fliplineditherlab.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Retro Dither & Machine Palette Converter
Resample a photo to a machine-style resolution, then quantise it with ordered (Bayer, blue noise) or error-diffusion dithering (Floyd–Steinberg, Atkinson, Jarvis, Stucki, Burkes, Sierra). Optional attribute cells imitate C64 and NES colour limits. Download a crisp PNG and a reusable recipe.
| Field | Type | Default | Description |
|---|---|---|---|
image (required) | file | — | Image (PNG, JPEG or WebP) |
resolution | select (custom, gb, cga, ega, c64-hires, c64-multicolor, nes, mac) | "custom" | Machine resolution |
width | integer | 320 | Working width (px) |
fit | select (cover, contain, stretch) | "cover" | Image fit for machine resolutions |
scale | integer | 2 | Output scale (whole pixels) |
palette | select (none, mono, gb-green, gb-gray, cga-0-low, cga-0-high, cga-1-low, cga-1-high, cga-5-high, cga-16, ega-64, c64, nes, rgb-8, custom) | "gb-green" | Retro palette |
customPalette | textarea | — | Custom palette (HEX list, GPL or JASC-PAL) |
dither | select (none, bayer2, bayer4, bayer8, blue-noise, floyd, atkinson, jarvis, stucki, burkes, sierra3, sierra2, sierra-lite) | "bayer4" | Dithering method |
strength | number | 100 | Dither strength (%) |
serpentine | boolean | true | Serpentine scanning for error diffusion |
match | select (srgb, redmean, linear) | "srgb" | Colour matching |
cells | select (none, c64-hires, c64-multicolor, nes) | "none" | Attribute cells |
brightness | number | 0 | Brightness |
contrast | number | 0 | Contrast |
gamma | number | 1 | Gamma |
saturation | number | 100 | Saturation (%) |
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://fliplineditherlab.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
flipline_dither_lab - Local stdio connector:
node src/mcp-stdio.ts --tool=flipline-dither-lab
{
"mcpServers": {
"flipline-dither-lab": { "type": "http", "url": "https://fliplineditherlab.usefulweb.app/mcp" }
}
}