put_llm_credential
Register or replace the namespace's provider key — verified with the provider before it is stored.
async fn put_llm_credential(&self, input: &PutLlmCredentialInput) -> Result<LlmCredential, BrainHttpError>Parameters
providerstringrequiredThe provider the key belongs to.
modelstringrequiredThe 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.
api_keystringrequiredThe key. Sealed on arrival and never readable again through the API.
Returns
provider / modelstringalwaysWhat was registered.
fingerprintstringalwaysA stable digest of the key — enough to tell two keys apart and confirm which is installed, and not enough to use.
created_at_unix_secsintegeralwaysWhen 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.
Was this page helpful?