Skip to content

About the OpenAPI spec

The platform exposes a complete OpenAPI 3.1.0 specification for every public endpoint. Every request and response is described by a Pydantic model — there are no untyped dict[str, Any] payloads in the spec.

Three URLs, all served by the API container:

PathPurpose
GET /openapi.jsonThe raw OpenAPI 3.1 JSON. Stable URL — point your tooling here.
GET /docsSwagger UI explorer (FastAPI built-in).
GET /redocReDoc renderer (FastAPI built-in).

Substitute your API host. These are the FastAPI defaults and are enabled out of the box.

A handful of routes are exposed but not listed in the spec because they aren’t registered as FastAPI route handlers: /metrics (Prometheus exposition wired into the ASGI app via api/observability.py), /docs, /redoc, and /openapi.json itself (FastAPI internals). Treat these four paths as out-of-band by convention.

The interactive API Reference reads from public/openapi.json. Refresh it whenever the API surface changes:

Terminal window
# From the docs-site/ directory, against a running API:
API_URL=http://localhost:8080 npm run sync:openapi
# Then rebuild the static site:
npm run build

In CI this typically runs after the API container’s health check passes. The docs container’s Dockerfile bundles the snapshot that was committed to git, so a build that needs absolutely-fresh API surface should regenerate it first.

The OpenAPI spec is suitable for:

  • TypeScript clientsopenapi-typescript (npx openapi-typescript http://localhost:8080/openapi.json -o api.ts) or openapi-fetch.
  • Python clientsopenapi-python-client or hand-written httpx against the spec.
  • Go clientsoapi-codegen.
  • Java / Kotlin clientsopenapi-generator.

We ship no first-party SDKs. The spec is the contract; generate what fits your stack.

  • Contract testing — automated fuzz tests that verify the running API against its own OpenAPI spec, catching drift before integrators hit it.
  • Integration guide §16.4 — operator notes on the OpenAPI surface (including how to disable Swagger / ReDoc in hardened deployments).