HTTP API reference

Every analysis in the app is a thin layer over a clean HTTP API. Run the engine from your own scripts, CI, or spreadsheets.


Every analysis in the app is a thin layer over a clean HTTP API. The web app never computes anything itself — it sends your inputs to the same engine you can call directly from your own scripts, CI pipelines, or spreadsheets. The request and response shapes are defined by a shared schema, so what you see in the app is exactly what the API accepts.

The API is served at https://api.pilecalc.com. Analysis endpoints take a JSON POST body and return JSON; each also has a GET variant for callers that cannot send headers.

Prefer an AI or agent client? The same analysis catalog is available through the PileCalc MCP server and ChatGPT integration.

Authentication

Requests are authenticated with an API key. Create one from your Settings → API keys, then send it as a bearer token on every request:

Authorization: Bearer <your_api_key>

On the GET variant only, the key may ride in the URL instead — ?key=<your_api_key> — for tools like Excel that cannot set headers. Prefer the header everywhere else: URLs end up in access logs.

Each key is tied to your account and your subscription plan, which together determine your rate limits. Treat keys like passwords — they grant full access to run analyses under your account. You can revoke a key at any time from the same screen.

Keep keys server-side

Because an API key carries your full quota, use it from a server, script, or CI job — never embed it in a browser or mobile app where users could read it.

Endpoints

One endpoint per analysis type, each with its own reference page — generated request-field tables, response fields, and runnable curl / JavaScript / Python examples:

EndpointReferenceComputes
POST /v1/lateralLateral (p-y)Laterally loaded pile — COM624P finite difference
POST /v1/axialAxialAxial capacity & settlement — NAVFAC DM-7.02, t-z/Vesić
POST /v1/footingFootingShallow footing — bearing, settlement, sliding, tilt
POST /v1/drilled-shaftDrilled shaftBored-pile capacity — FHWA-IF-99-025
POST /v1/group-verticalGroup · verticalGroup capacity, efficiency & settlement
POST /v1/group-lateralGroup · lateralRow-by-row p-multiplier group analysis
POST /v1/upliftUpliftPlate/helix breakout & anchor bond capacity
POST /v1/moment-curvatureMoment–curvatureFiber-integrated M–φ & nonlinear EI
POST /v1/slopeSlopePile-row demand/capacity across candidate slip surfaces

Two helper endpoints round out the surface:

  • GET /v1/usage — your current plan, quota, and remaining calls (key required, not metered).
  • GET /v1/health — service status (no key required).

The GET variant & fields

Every analysis endpoint also answers GET, for header-less callers like Excel's WEBSERVICE() and Sheets' IMPORTDATA():

GET /v1/<type>?key=<api_key>&req=<url-encoded JSON>&fields=<dot.paths>

req is the exact POST body, URL-encoded and validated by the same schema. Without fields you get the full JSON response; with it, a text/plain CSV of the selected scalar leaves (e.g. fields=head.deflection,maxMoment.value — numeric segments index arrays), which drops straight into a spreadsheet cell. Auth, plan gating, and metering are identical to POST. The Excel integration guide covers this end to end.

Rate limits & quotas

API access is included on the Pro and Business plans (the Free plan has none). Each paid plan includes a monthly allowance of API calls (resetting on the 1st, UTC) plus a per-minute burst guard. Successful analysis calls count against your quota; rejected requests (auth or validation failures) do not, and neither do /v1/usage and /v1/health.

PlanCalls / monthBurst / minute
Free
Pro1,00030
Business5,00060

Successful responses include X-RateLimit-Limit (your monthly quota) and X-RateLimit-Remaining (calls left this month) headers. Call GET /v1/usage any time for a snapshot of where you stand.

Errors

Every error has the shape { "error": { "code", "message", issues? } }. The full list:

400
validation_errorthe request failed schema validation — the body, the GET req/fields params, or a bad JSON payload (see issues).
401
unauthorizedmissing, invalid, or revoked API key.
403
api_access_deniedthe key belongs to a Free-plan account — API access requires Pro or Business.
422
engine_errorinputs were valid but the analysis could not complete (e.g. a physically impossible profile).
429
rate_limitedper-minute burst exceeded — retry after the Retry-After header (seconds).
429
quota_exceededmonthly quota reached — upgrade or wait for the reset on the 1st (UTC).

Validation errors list each problem keyed by its field path — the same validation that powers the app's inline errors:

{ "error": { "code": "validation_error",
  "issues": [ { "path": ["pile","diameter"], "message": "Number must be greater than 0" } ] } }

Units

The API is unit-agnostic: supply any self-consistent system and results come back in the same units. There are no hidden conversions, so the rules in Units & sign conventions apply equally to API calls — in particular the water unit weight for axial and shaft analyses. The examples on the per-endpoint pages all use SI (m, kN, kPa, kN/m³).