Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
putLlmCredentialgetLlmCredentialtestLlmCredentialverifyLlmCredentialdeleteLlmCredential
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKCredentialsverifyLlmCredential

verifyLlmCredential

Re-check the stored key — a key that worked at registration can be revoked later.

PURPOSE

Re-check the key already stored. A key that worked at registration can be revoked or run out of credit later; without this verb the first sign is an opaque upstream failure on a write.

POST/v1/llm-credential/verifyBearer API keystable
verifyLlmCredential(): Promise<LlmCredentialCheck>

Returns

FieldTypePresence
status / valid / reason / providerLlmCredentialCheckalways

The same shape testLlmCredential returns. valid absent still means no verdict, not a failure.

Brain never takes a provider key from a request

The key is registered once, through these verbs, and sealed. It is never accepted as a per-request field, never returned by any read, and never configured on the Brain server itself. Anything that looks like a deploy-time provider key is from an older design. See Namespaces.

These five verbs exist on the HTTP tier only — the wire protocol has no credential routes.

When there is no usable credential

Extraction that needs the LLM fails with a typed error rather than degrading silently:

CodeStatusRetry
llm_credential.missing409fatal

No credential is registered. Deliberately a 409 and not a 503: the SDK's retry list is transport failures, 429 and 503, and this condition cannot self-heal, so retrying would spin forever against a tenant that simply has not registered a key. Wire code LlmCredentialMissing.

llm_credential.unavailable503retriable

A credential exists but the broker could not resolve or use it. A 503 precisely so clients do retry; collapsing it into the 409 would permanently fail writes for a healthy tenant. Wire code LlmCredentialUnavailable.

Non-LLM extraction — the pattern and classifier extractors — is unaffected, and encode and recall keep working. See Policies.

See also
ErrorsPolicies

Was this page helpful?

testLlmCredential

Check a candidate key without storing it — safe against a namespace that already works.

deleteLlmCredential

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

On this page

ReturnsWhen there is no usable credential
Suggest an editOpen in Playground