Brain Server exposes a versioned HTTP API. Every response carries an
X-Api-Version header. This page is the informational overview; the complete,
machine-readable contract is at GET /openapi.yaml at runtime and
openapi.yaml in the repo, with the full written contract in
API_CONTRACT.md.
Liveness probe (minimal {status, version}; detail on /health/db)
GET
/health/db
Read-gated detail — capacity, pool, hardening, model, otel, DPO
GET
/stats, /version
Counts, model, version
GET
/openapi.yaml
Full API contract
POST
/v1/embeddings
OpenAI-compatible embeddings endpoint
POST
/ingest/memory
Structured memory ingest
POST
/ingest/markdown
Markdown ingest + graph extraction
POST
/ingest
Structured ingest (explicit entities/relations)
POST
/sources/reconcile · DELETE /sources/{id}
Sweep deleted sources / retire a source
POST
/recall
Structured recall — the primary endpoint
GET
/search
Semantic search (deprecated; use /recall)
GET
/get/{id} · POST /multi-get
Fetch chunk(s) by id
GET
/recall/{trace_id}/trace
Recall-trace replay (decision-path evidence)
POST
/verify
Span verification — is a claim supported by a chunk’s text? Binds the X-Brain-Domain label in SQL (an id cannot cross domains in shim mode) + the record gate.
Human-in-the-loop write-back (v1.14). Since v1.27.12 approve accepts an optional digest (SHA-256 of the read-canonical review form, as served by GET /proposals); any drift → 409 — the approval binds to the bytes the reviewer saw
GET
/proposals?status= · /decayed
Approval queue + decayed review. Each row is a ProposalView (content = read-canonical form, content_digest = SHA-256 the approve verb binds to, v1.27.12)
POST
/consolidate/propose · /apply · /undo
Reviewable consolidation, supersession, undo
POST
/suggest · /suggest/feedback · GET /suggest/metrics
Opt-in anticipation + false-positive metric
POST
/verify
Claim span verification
POST
/classify · /decision/{id}/evaluate
Deterministic categorization / decision rules
POST
/procedure · GET /procedure/{id}/steps
Ordered procedures (steps bind the X-Brain-Domain label + record gate)
Create a domain pool (200 = existed, 201 = created; body {domain})
GET
/domains
List known domains (single global pool when multi-db is off)
DELETE
/domains/{name}?confirm=<name>
Delete a domain + all its data (echo-confirm guard, global protected)
POST
/domains/{name}/vacuum
VACUUM one domain pool (returns {name, vacuumed: true})
GET
/domains/{name}/export
Consistent SQLite snapshot download (VACUUM INTO, attachment; filename="brain-<name>.db") — Read in multi-db; Admin in shim mode (the snapshot is the whole shared pool there)
POST
/domains/{name}/import
Restore a snapshot into a NEW domain (raw bytes body; 201 {name, imported: true, bytes})
POST
/domains/recompute
One-shot centroid recompute sweep over every domain ({recomputed: [[domain, n], …]})