Brain

Brain API Quickstart

Provision a Unison brain, verify your key, and make your first context-recall call - three curl commands, under two minutes.

unison-brain

Provision a brain, verify it, and recall context in three curl commands. The base URL is https://brain.unisonlabs.ai; every authenticated call sends Authorization: Bearer usk_....

1. Provision

curl -X POST https://brain.unisonlabs.ai/v1/auth/provision \
  -H 'content-type: application/json' \
  -d '{"email": "you@example.com"}'
{ "apiKey": "usk_...", "workspaceId": "…", "status": "unverified", "emailSent": true }

The account works immediately (unverified, with usage caps). The usk_ key is returned once - store it.

2. Verify (lifts the caps)

Enter the code from the email:

curl -X POST https://brain.unisonlabs.ai/v1/auth/verify \
  -H 'content-type: application/json' \
  -d '{"email": "you@example.com", "code": "123456"}'

3. First recall

curl 'https://brain.unisonlabs.ai/v1/brain/context?q=what%20did%20we%20decide%20about%20auth' \
  -H "Authorization: Bearer $UNISON_TOKEN"
{
  "query": "what did we decide about auth",
  "mode": "auto",
  "topScore": 0.92,
  "weakEvidence": false,
  "hits": [  ],
  "entities": [  ],
  "contextMd": "## Memory\n\n…"
}

contextMd is the prompt-ready block - inject it into your model's context. A fresh brain returns weakEvidence: true (nothing relevant yet): write something with POST /v1/brain/ingest and recall again.

Prefer a terminal? unison auth login does steps 1-2 interactively (email OTP, no browser), then unison context "your question".

On this page