Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
whoamicapabilitiesping
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKIntrospectionwhoami

whoami

The namespace, space and permissions the credential carries — the cheapest round trip that proves a key.

PURPOSE

Who the credential says you are. The cheapest round trip that proves the key, the base URL and the network path all work at once.

GET/v1/whoamiBearer API keystable
whoami(): Promise<Whoami>

Returns

FieldTypePresence
namespacestringalways

The namespace the credential belongs to. It comes from the key — you cannot select it per request on this tier.

spaceIdstringalways

The space the key reads and writes.

permissionsPermissionsalways

canEncode, canRecall, canPlan, canReason, canForget, canAdmin — booleans. Check them before offering an action rather than discovering the refusal at call time.

Example

const me = await brain.whoami();
if (!me.permissions.canForget) hideDeleteButton();

The wire tier answers this without a round trip

A wire client already knows: the handshake returns the namespace, the bound space and the permissions, and the client exposes them as connection properties. There is no wire whoami because there is nothing to ask.

See also
capabilitiesIdentity by key

Was this page helpful?

deleteLlmCredential

Remove the namespace's provider key, and learn whether there was one to remove.

capabilities

Which optional capabilities are enabled on this shard, and the vector dimension you must match.

On this page

ReturnsExample
Suggest an editOpen in Playground