Skip to main content
PUT
Store a provider key

Authorizations

Authorization
string
header
required

An organization API key. Keys carry a role (read_write or read_only) and may be restricted to a namespace prefix such as acme/*, or to one namespace such as acme/prod/tenant_1. A prefix matches on a / boundary: acme/prod/tenant_1* covers acme/prod/tenant_1 and everything under acme/prod/tenant_1/, never acme/prod/tenant_12.

Headers

Idempotency-Key
string

One key per logical request, reused only on its retries. A key belongs to one request: within your organization, the same method, path, query and body. For 24 hours after a successful response, a request with the key and the same body gets that response back verbatim, with Idempotent-Replayed: true, and runs nothing. Only a successful response is kept, so the retry of a request that failed runs again. While the first request runs or its response is kept, the key with a different request is idempotency_key_reused (422). A request sent while one with its key is still running is rate_limited with Retry-After: 1, without running: retry it to get the first one's response. In the rare case the key can't be checked, the request runs as if it had none.

Required string length: 1 - 255

Path Parameters

provider
enum<string>
required

A provider whose models a judgment can run on your own key.

Available options:
typesafe,
openai,
anthropic,
google

Body

application/json
key
string
required

The provider's API key, 16 to 512 characters with no control characters. Stored sealed and never returned.

Pattern: ^[^\x00-\x1F\x7F]{16,512}$
namespace
string

Store it for this namespace only. Without it, for the whole organization.

Required string length: 1 - 256
Pattern: ^(?!\.\.?$)[A-Za-z0-9._:/-]+$
test_model
string

The model to test the key on. Defaults to one the provider serves to every key.

Pattern: ^[A-Za-z0-9._:-]{1,128}$
default_model
string

The model a judgment that names no engine runs on. Defaults to test_model.

Pattern: ^[A-Za-z0-9._:-]{1,128}$
probe_interval_s
integer

How often, in seconds, Brussle probes each model your judgments run on with this key, to see when its behaviour changes. Defaults to 300. A replaced key keeps the scope's setting unless you send one. Sending the same key with a new value changes only this.

Required range: 30 <= x <= 3600

Response

Stored, or already stored with this key.

A stored provider key, without the key.

id
string
required

Changes when the key is replaced.

Pattern: ^cred_[0-9a-z]{26}$
slot
string
required

The provider and scope, as org:<org id>/<provider> or ns:<org id>/<namespace>/<provider>. It stays the same when the key is replaced.

Minimum string length: 1
provider
enum<string>
required

A provider whose models a judgment can run on your own key.

Available options:
typesafe,
openai,
anthropic,
google
scope
object
required

Whom a credential serves, the whole organization or one namespace.

key_hint
string
required

The key's last four characters, after ….

Minimum string length: 1
status
enum<string>
required

active, or rejected when the provider refused the key after it was stored: judgments on it stop until a test passes or a new key is stored.

Available options:
active,
rejected
test_model
string
required

The model the last test ran on.

Pattern: ^[A-Za-z0-9._:-]{1,128}$
default_model
string
required

The model a judgment that names no engine runs on.

Pattern: ^[A-Za-z0-9._:-]{1,128}$
tested_at
string<date-time>
required
rejected
null | object
required

When and why the provider refused the key; null while it is active.

created_at
string<date-time>
required
created_by
string
required

The API key or dashboard user that stored it.

Minimum string length: 1
watch
object
required

How Brussle watches the models your judgments run on with this key for a change of behaviour. It sends a fixed short set of questions, none of your documents, to your provider on this key, each probe_interval_s for each model in use, and your provider bills those calls. A model that answers no decision type (an embedding model, for example) is not sent them; Brussle watches the model id its responses name instead.