API & MCP
Everything a person can do on Raster Artwork to SVG, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminarastervectorizer.usefulweb.site/api/v1/calculate– run Raster Artwork to SVGGET https://luminarastervectorizer.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Raster Artwork to SVG
Upload a PNG, JPEG or WebP and trace sampled pixels into editable polygonal SVG paths. Set color count or a custom palette, switch to black and white, remove a border color and drop small regions. The file tool uploads to the server; Lumina Vector Lab uses the same engine.
| Field | Type | Default | Description |
|---|---|---|---|
image (required) | file | — | Image (PNG, JPEG or WebP; 8 MB, 16 MP maximum) |
mode | select (color, mono) | "color" | Tracing mode |
colors | number | 6 | Automatic color count |
resolution | select (64, 128, 256, 384, 512) | "256" | Longest sampled side (pixels) |
threshold | number | 128 | Black / white threshold |
alpha | number | 128 | Minimum visible alpha |
minArea | number | 4 | Drop regions smaller than this pixel count |
background | select (keep, border) | "keep" | Background |
palette | text | — | Custom HEX palette (optional; 2–16 colors) |
smooth | number | 0 | Curve smoothing in sampled pixels (0 = exact pixel edges; 0.5–1.5) |
colorEdges | boolean | false | Also smooth edges between colors (needs curve smoothing) |
Example request
Trace a simple red image
curl -X POST https://luminarastervectorizer.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"image":{"filename":"sample.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX/////AADrWueTAAAAEklEQVQI12NgIBb8/09dgjgAAPcnH+GApkH4AAAAAElFTkSuQmCC"}}'
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://luminarastervectorizer.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_raster_vectorizer - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-raster-vectorizer
{
"mcpServers": {
"lumina-raster-vectorizer": { "type": "http", "url": "https://luminarastervectorizer.usefulweb.site/mcp" }
}
}