Brain Docs

Reference

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

putLlmCredential

Register or replace the namespace's provider key — verified with the provider before it is stored.

PURPOSE

Register or replace the namespace's provider key. The edge verifies it with the provider before storing it, so a bad key fails here rather than on the first extraction.

PUT/v1/llm-credentialBearer API keystable
putLlmCredential(input: PutLlmCredentialInput): Promise<LlmCredential>

Parameters

ParameterTypeRequired
providerstringrequired

The provider the key belongs to.

modelstringrequired

The model to use for extraction. Pick one with enough output budget — a reasoning model given a small cap returns empty forever and bills every retry.

apiKeystringrequired

The key. Sealed on arrival and never readable again through the API.

Returns

FieldTypePresence
provider / modelstringalways

What was registered.

fingerprintstringalways

A stable digest of the key — enough to tell two keys apart and confirm which is installed, and not enough to use.

createdAtUnixSecsintegeralways

When it was registered. Note: seconds, not the nanoseconds used everywhere else in the API.

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.

This verb is not retried by the SDK. A PUT that may have landed is not safe to repeat blind when what it replaces is a live credential.

See also
testLlmCredentialNamespaces

Was this page helpful?

txnAbort

Discard a transaction's writes without waiting for its timeout.

getLlmCredential

See which provider key is installed — provider, model and fingerprint, never the key.

On this page

ParametersReturns
Suggest an editOpen in Playground