API & MCP
Everything a person can do on Color Region Cutout & Mask, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminacolorregion.usefulweb.site/api/v1/calculate– run Color Region Cutout & MaskGET https://luminacolorregion.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Color Region Cutout & Mask
Click by percentage coordinates to select similar colors. Choose contiguous four-connected pixels or every matching pixel, tune tolerance, invert the selection and feather its boundary. Download a PNG cutout or erased region plus a grayscale mask. This file tool uploads to the server; Lumina Selection Lab performs the same selection.
| Field | Type | Default | Description |
|---|---|---|---|
image (required) | file | — | Image (PNG, JPEG, WebP or GIF; up to 8 MB and 16 MP) |
x | number | 50 | Seed X (%) |
y | number | 50 | Seed Y (%) |
tolerance | integer | 24 | Color tolerance (0–255) |
connected | boolean | true | Contiguous pixels only |
invert | boolean | false | Invert selection |
feather | integer | 0 | Feather radius (working pixels) |
operation | select (cutout, erase) | "cutout" | Result |
Example request
Keep the red image region
curl -X POST https://luminacolorregion.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"image":{"filename":"red.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX/////AADrWueTAAAAEklEQVQI12NgIBb8/09dgjgAAPcnH+GApkH4AAAAAElFTkSuQmCC"},"x":50,"y":50,"tolerance":0,"feather":0}'
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://luminacolorregion.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_color_region - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-color-region
{
"mcpServers": {
"lumina-color-region": { "type": "http", "url": "https://luminacolorregion.usefulweb.site/mcp" }
}
}