Skip to content

Errors & Health

Health

Reachable without auth:

  • GET /api/health — basic availability + size of the loaded catalog.
  • GET /api/llm/health — availability of the LLM backend. This covers tiers 2 and 3 of deep research as well as /api/documents/extract and /api/llm/generate. If it reports down, tier 1 of deep research still works — the other two endpoints do not.

Error codes

  • 401 — API key missing or invalid.
  • 422 — request validation failed (e.g. query empty or too long, unknown document_type).
  • 429 — rate limit or daily quota of the key reached; the Retry-After header says when to try again.
  • 502 — the LLM call failed or returned nothing usable. Only on the LLM-backed endpoints; retry once, then treat as an outage.
  • 503 — service not ready or LLM backend not configured.

On the endpoints that process documents (/api/documents/extract, /api/llm/generate), error messages are deliberately generic. Provider error texts can quote parts of the request, and that request may contain patient data.