Exact unit conversion with dimensional analysis (NIST SP 811)

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/unit-convert · Id unit-convert

Converts up to 100 values between units for an agent that needs the exact factor and a refusal when the units do not match: SI and NIST SP 811 length, mass, time, volume, pressure, energy, power, temperature, with compound expressions like kg*m/s^2. Rejects incompatible dimensions, converts absolute temperatures affinely through kelvin and temperature differences linearly, and converts mass to volume (cups to grams) only with a caller-supplied density. It does NOT look up ingredient densities, guess which cup or gallon a bare symbol means (cup is 236.5882365 mL US customary, 240 mL US label, 250 mL metric or 200 mL Japanese: say which), or handle currencies and dates.

What you get

Wrong unit conversions fail silently in recipes, dosing and specs. 100 conversions per $0.005 call, each with its factor source.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/unit-convert. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/unit-convert \
  -H 'content-type: application/json' \
  -d '{"items":[{"value":212,"from":"degF","to":"degC"},{"value":1,"from":"cup_us","to":"mL"},{"value":10,"from":"degC","to":"degF","kind":"difference"}]}'

Input

FieldTypeRequiredDescription
itemsarray<object>; max 100 itemsyesConversions to run.
densityobjectnoDefault density for items that cross mass and volume.
precisioninteger; 1..30noSignificant digits of the reported value. Default 12.

Example request body

{
  "items": [
    {
      "value": 212,
      "from": "degF",
      "to": "degC"
    },
    {
      "value": 1,
      "from": "cup_us",
      "to": "mL"
    },
    {
      "value": 10,
      "from": "degC",
      "to": "degF",
      "kind": "difference"
    }
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
resultsarray<object>no
precisionintegerno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the physical-ops-kit package.

Machine-readable