API & MCP

Everything a person can do on Bézier Curve Fitter for SVG Paths, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Bézier Curve Fitter for SVG Paths

Paste SVG path data from a tracer, a drawing tablet or a plotter export. The fitter replaces runs of short segments with cubic Bézier curves and straight lines, keeps sharp corners, and proves that the new path stays within your tolerance of the original in both directions. Pixel mode treats the path as pixel steps (as traced by Lumina Vector Lab) and smooths the stairs; freehand mode follows every point. Lumina Vector Lab uses the same engine for curve smoothing.

Inputs of Bézier Curve Fitter for SVG Paths
FieldTypeDefaultDescription
path (required)textarea"M0 49.2 L5 58.2 L10 64.8 L15 70.4 L20 74.8 L25 77.7 L30 80.7 L35 79.9 L40 77.3 SVG path data (d attribute)
modeselect (freehand, pixel)"freehand"Input kind
tolerancenumber1Maximum distance from the input (path units)
cornerAnglenumber50Keep corners sharper than (degrees)
precisioninteger3Decimals in the result

Example request

Smooth a hand-drawn wave

curl -X POST https://luminacurvefit.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"path":"M0 49.2 L5 58.2 L10 64.8 L15 70.4 L20 74.8 L25 77.7 L30 80.7 L35 79.9 L40 77.3 L45 72.9 L50 67.2 L55 62.2 L60 54.6 L65 46.8 L70 39.1 L75 32.1 L80 28.1 L85 23.6 L90 20.7 L95 19.6 L100 20.4 L105 25 L110 29.2 L115 34.8 L120 41.2 L125 48.2 L130 57.3 L135 63.9 L140 69.7 L145 74.3 L150 77.3 L155 80.6 L160 80.1 L165 77.7 L170 73.6 L175 67.9 L180 63.2 L185 55.6 L190 47.7 L195 40 L200 32.9","mode":"freehand","tolerance":1,"cornerAngle":50,"precision":2}'

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)

{
  "mcpServers": {
    "lumina-curve-fit": { "type": "http", "url": "https://luminacurvefit.usefulweb.app/mcp" }
  }
}