API & MCP

Everything a person can do on UnitProof Unit Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

UnitProof Unit Calculator

Type an expression such as "3.5 km/h * 2 h to m", "72 F to C" or "1500 W * 3 h to kWh". UnitProof parses it, checks dimensions over the SI base units, applies exact NIST/SI conversion factors and shows every step as a derivation tree, including correct absolute-vs-difference temperature handling.

Inputs of UnitProof Unit Calculator
FieldTypeDefaultDescription
expression (required)text—Expression. Numbers, units with SI prefixes, ^ powers, * / + − and parentheses; optional "to"/"in" target. Juxtaposition (e.g. "2 h") binds tighter than * and /. Bare C/F mean °C/°F.
significantDigitsinteger6Significant digits (rounded value)

Example request

Distance: 3.5 km/h for 2 h in metres

curl -X POST https://unitproof.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"expression":"3.5 km/h * 2 h to m"}'

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": {
    "unitproof": { "type": "http", "url": "https://unitproof.usefulweb.site/mcp" }
  }
}