BBramaDocs
Browse documentation

Anthropic anthropic

The Anthropic platform API paid by the deployment's own key. Routes are anthropic/<model> over anthropic-messages. Not to be confused with claude-code: same host, same wire protocol, entirely different money — claude-code spends an agent's Claude subscription through an OAuth bearer, this route spends the deployment's Anthropic account through an API key.

How we authenticate

There is no login flow here. Anthropic issues a long-lived API key in its console; an operator stores it once in the Skarbiec vault, and at final use the gateway redeems the deployment's capability for this provider through the local entitlements router, reduces the stored document to the bare key, and sends it as x-api-key: <key> with anthropic-version: 2023-06-01. The key has no refresh path and no invented expiry — it works until Anthropic revokes it or an operator replaces it in the vault, and brama subscription refresh anthropic answers exactly that: API keys have no refresh path.

The two failure shapes point at two different repairs: a 503 credential_unauthorized means no capability, read grant or trust material produced a key at final use — repair the authorization chain (runbook); a 502 provider_failure with provider_authentication: Incorrect API key provided: ... means the key was produced and Anthropic rejected it — repair the provider account.

Models

Pinned catalog rows, widened (never replaced) by live discovery through the models endpoint: anthropic/claude-haiku-4-5, anthropic/claude-opus-4-6, anthropic/claude-sonnet-4-6.

Plan usage

Anthropic's free usage report at api.anthropic.com/api/oauth/usage is issued to OAuth credentials only, so this API-key route publishes no plan state. The ledger records that absence as the provider's own answer, never as a zero (subscription).

Endpoints

Chathttps://api.anthropic.com/v1/messages
Model discoveryhttps://api.anthropic.com/v1/models
Auth headerx-api-key: <key> with anthropic-version: 2023-06-01
Trusted hostapi.anthropic.com
Base URL overrideBRAMA_PROVIDER_ANTHROPIC_BASE_URL, validated with the refusals in provider