API & MCP
Everything a person can do on Compare Text Sample With Your Fonts, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminafontcompare.usefulweb.app/api/v1/calculate– run Compare Text Sample With Your FontsGET https://luminafontcompare.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Compare Text Sample With Your Fonts
Upload a picture of one or more lines of text, type the text it shows and add up to four font files you own. The tool finds each character, draws the same characters with every font from its own outlines at a matching size and ranks the fonts by shape, overlap, width, height, stroke weight and baseline. It compares your sample with the fonts you provide — it does not identify unknown fonts. Files are uploaded to the server for this calculation; Lumina's Type Lab Font Matcher does the same on your device.
| Field | Type | Default | Description |
|---|---|---|---|
image (required) | file | — | Sample picture of text (PNG, JPEG or WebP; up to 8 MB) |
text (required) | text | — | Text shown in the picture, in reading order (spaces are ignored) |
font1 (required) | file | — | Font file 1 (TTF, OTF or WOFF with TrueType outlines; up to 2 MB) |
font2 | file | — | Font file 2 (optional) |
font3 | file | — | Font file 3 (optional) |
font4 | file | — | Font file 4 (optional) |
threshold | integer | — | Ink threshold (1–254; leave empty for automatic) |
polarity | select (auto, dark, light) | "auto" | Text colour |
deskew | boolean | true | Straighten tilted text |
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://luminafontcompare.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_font_compare - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-font-compare
{
"mcpServers": {
"lumina-font-compare": { "type": "http", "url": "https://luminafontcompare.usefulweb.app/mcp" }
}
}