Authentication
Living Brain requires two headers on every request.
The split matters: one API key serves your whole application, while x-subject-id keeps
each of your users’ brains isolated from one another. Pass through a stable identifier from
your own auth system — a user id, not an email.
Configuring the SDKs
Both clients read from the environment when you don’t pass values explicitly, so production code usually needs no arguments at all.
A key is a bearer credential for your entire organization. Keep it server-side — never ship it to a browser or mobile client. If you need browser access, proxy through your backend.
Per-user clients
Because the subject is a client-level header, the usual pattern is one client per request, constructed with whichever user you’re serving:
Roles and permissions
An API key inherits the role of the member it was issued to. The organization creator is the owner.
Failure modes
See Errors for the full error envelope.