JSON API
The clearance reconciliation is free and unauthenticated — no key, no signup. Rate limited per IP and CORS-open, so you can call it from a browser, an estimating tool or an agent. The OpenAPI 3.1 document is at /api/openapi.json.
jurisdictionId for anywhere else: the response then carries the manufacturer and model-code layers with an explicit incompleteness warning in advisories, rather than a guessed local figure. Do not present a result without a jurisdiction to a user as a complete answer.Reconcile one site
POST https://setbackcalc.vercel.app/api/calculate
Request
curl -X POST https://setbackcalc.vercel.app/api/calculate \
-H 'Content-Type: application/json' \
-d '{
"projectRef": "14 Elm Rise",
"familyId": "generac-air-cooled",
"fuel": "natural-gas",
"mounting": "ground",
"jurisdictionId": "leon-county-fl"
}'Response (abridged)
Note what the opening:all:minrow does: Florida’s 10 ft governs, and the 5 ft figures from NFPA 37 and Generac are still reported, marked superseded. The reconciliation is auditable rather than asserted.
A figure is superseded only when something strictly stricter governs. Where another layer states the same distance it is marked concurring instead — the layers agree, and nothing was overridden. Lot-line setbacks are measured to the property boundary rather than the building, so they are excluded from governingDistanceInches and reported in greatestLotLineSetbackInches.
{
"family": {
"manufacturer": "Generac",
"family": "Air-cooled home standby",
"ratingsAffectClearances": false
},
"jurisdiction": { "covered": true, "name": "Leon County", "state": "FL" },
"governingDistanceInches": 120,
"greatestLotLineSetbackInches": null,
"schedule": [
{
"id": "opening:all:min",
"aspectLabel": "Operable opening",
"faceLabel": "Any face",
"bound": "min",
"requiredInches": 120,
"governing": {
"layer": "jurisdiction",
"source": "Leon County, FL",
"inches": 120,
"requirement": "Exhaust termination a minimum of 10 ft from any opening ...",
"citation": {
"label": "FBC Residential §M1905.2.5 Exhaust location",
"quote": "Exhaust termination shall be a minimum of 10 feet (3048 mm) from any openings ...",
"sourceFile": "docs/leoncountyfl-generator-requirements.txt"
}
},
"considered": [
{ "layer": "manufacturer", "inches": 60, "superseded": true, "concurring": false, "citation": { "...": "..." } },
{ "layer": "code", "inches": 60, "superseded": true, "concurring": false, "citation": { "...": "..." } }
],
"verdict": "unknown"
}
],
"advisories": [ { "severity": "warning", "title": "HOA and deed restrictions are not checked" } ],
"compliance": { "checked": 0, "passed": 0, "failed": 0, "unknown": 0 }
}Checking distances you already have
Supply proposed, keyed by schedule row id and measured in inches, and each row comes back with a verdict. Rows you omit are reported as "unknown" — never as passing.
{
"familyId": "generac-air-cooled",
"fuel": "natural-gas",
"mounting": "ground",
"jurisdictionId": "leon-county-fl",
"proposed": { "opening:all:min": 96, "airIntake:all:min": 130 }
}Asserting a published exception
Reductions apply only when you assert the condition they depend on. Each of these is something an inspector can ask you to evidence.
{
"conditions": {
"enclosureFireTestDemonstrated": true,
"wallFireRatedOneHour": false,
"localCodeRejectsListing": false,
"coAlarmsInstalled": true
}
}Accepted values
familyId
generac-air-cooled— Generac Air-cooled home standby, Guardian and PowerPact air-cooled home standby, 9 kW–22 kW (60 Hz)cummins-rs— Cummins RS home standby, RS13A; RS17A; RS20A; RS20ACkohler-resa-resc— Kohler RESA / RESC residential, 14RESA; 14RESAL; 20RESC; 20RESCL; 20RESA(L) (no longer available)
jurisdictionId (optional)
scarsdale-ny— Village of Scarsdale, NYwall-nj— Township of Wall, NJpemberton-nj— Pemberton Township, NJleon-county-fl— Leon County, FL
Others
fuel—natural-gas,lp-vapourmounting—ground(NFPA 37 §4.1.4) orelevated(§4.1.3, different figures)districtId— only where the jurisdiction publishes district-dependent setbacks. Scarsdale does.
PDF schedule
POST https://setbackcalc.vercel.app/api/schedule.pdf
Same body, returns application/pdf. Anonymous and free callers get a watermarked document; the distances are identical in both tiers, because altering a published compliance figure by billing tier would be a liability. The tier used is reported in the X-SetbackCalc-Tier response header.
Batch
POST https://setbackcalc.vercel.app/api/batch
Takes { projectName?, sites: [...] }. A site that fails validation reports its own error and does not fail the batch. Add ?format=pdf for a combined document. Pro feature.
The dataset itself
GET https://setbackcalc.vercel.app/api/reference
Every manufacturer rule, model-code baseline and jurisdiction rule with its verbatim source quote, plus the coverage statement. Use it to check a figure against its source rather than calculating, or to find out whether something is covered before you call.
Errors
The API refuses rather than substituting a default. An unknown familyId or a jurisdictionId outside the dataset returns 422 with the offending field named — it will not silently fall back to a nearby manufacturer or a national average, because there is no such thing.
{
"error": "calculation_error",
"field": "jurisdictionId",
"message": "Jurisdiction \"king-county-wa\" is not in the dataset. Omit jurisdictionId to get the manufacturer and model-code layers with an explicit \"verify locally\" note, rather than a guess."
}Prefer to call it from an agent? The same engine is exposed over MCP — see the MCP documentation. How each figure was sourced is set out in the methodology.