Tab · Build

API

Find the endpoint, contract, and failure mode without leaving the page. The canonical HTTP API reference — every route the aggregator serves, with method, auth, request shape, response shape, and how each one fails.

See it in motion

Where to find it

  • Localhost: /api.html?repo=<id>
  • On disk: .claude/brain/api.md
  • Keyboard: K then api
  • Sidebar: Build → API

What it does for you

One canonical list — no guessing what's real.Every endpoint the server exposes lives in this file. Add a route in server.mjs, add a row here in the SAME PR. The list is the contract.
Know how it fails before you call it.Each row has a failure-mode column — what the endpoint returns on missing-key, missing-repo, rate-limit, upstream-down. Stop discovering 500s in production.
The HTML twin auto-syncs.Edit the markdown, run npm run sync-brain, commit both. The drift gate fails the PR if you forget.

Configure

Nothing — pure markdown reference. The file is the source; the twin is generated.

Use it well

When you add an endpoint to server.mjs, append the row here in the same PR (method, path, auth, request, response, errors). When you change an endpoint's response shape, update the row in the same PR — the brain-record gate enforces this.

Read more