> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hermesco.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> The contract OpenAPI spec, and the routes the hosted desk actually serves.

> [!WARNING]
>
> The generated pages after this one are the contract in `contract/openapi.yaml` (OpenAPI 3.1, version 0.1.0, PR #14, on main). They are the shared shape agents build against. `porchlight.earth` does not serve `/runs`, `/alerts`, or `/health` from that file.

Mintlify reads `docs/contract/openapi.yaml`, a full copy of `contract/openapi.yaml`. That path is a regular file. A symlink there is a 27-byte pointer, and the docs host cannot follow it. Do not treat the playground as a call against the live desk.

## Routes the live desk serves

Checked 2026-10-25.

| Request | Result |
| - | - |
| `GET /api/national` | Published catalog, 3,235 counties, `publication.mode` `published_static` |
| `GET /api/national?county=35013` | Completed snapshot for Doña Ana |
| `GET /api/national?county=48395` | HTTP 503. No snapshot. No substitute county |
| `GET /api/national?recent=1` | Up to 20 published counties |
| `POST /api/national` | HTTP 403, `Same-origin local access is required for model operations.` |

Implementation: `web/src/app/api/national/route.ts`. Weather captures are `web/src/app/api/weather/`.

On loopback, the same GET reads the local catalog when the published pack is not what that process serves, and POST can start a job or a call script. Those local responses are not the contract `/runs` objects either. They are national job checkpoints.

## How to read the contract pages

The spec's own summary says the formula ranks and Nemotron explains. Fixture files under `contract/fixtures/` include mock trace numbers. A page that cites `trace_mock.json` or `joins_mock.json` is showing fixtures. Measured query ids are on the published county snapshots, listed in [Evidence trail](https://docs.hermesco.ai/evidence-trail.md).

Contract error codes include `not_found`, `bad_request`, `no_facilities`, `source_stale`, `zetaris_down`, `meterless_unauthorized`, `meterless_offline`, `timeout`, and `export_refused`. The hosted national route uses its own JSON `error` string and HTTP status, as in the table above.

`JoinProposal.seen_before` in the spec is described as H-MEM. That engine is not claimed. See [Zetaris](https://docs.hermesco.ai/zetaris-federation.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.