Create an Org API Key
Creates a new bd-... gateway API key. The raw key is returned in
this response and never again — copy it immediately. Either assign
the key to a user_id or bind it to a group_name; not both.
bd-… API key for the LLM Gateway runtime
(/v1/chat/completions, /v1/messages, /v1/embeddings, etc.).
A key is either assigned to a single user or bound to an IdP group,
not both. Use the binding to control scope of:
- per-user/per-group token budgets
- per-user/per-group rate limits
- per-user/per-group model access policies
Example: a CI service-account key
key. From that point on, callers can use it as:
DELETE /admin/api-keys/{id}.Authorizations
JWT obtained through Barndoor's authentication flow. Pass the token
verbatim in Authorization: Bearer <token>. Use the Barndoor SDK's
loginInteractive() helper to obtain a token in scripts and notebooks.
Body
Assign the key to a specific user. Mutually exclusive with group_name.
Optional override for the email recorded on the key
Bind the key to an IdP group. Members of the group share the
group-scoped budgets, rate limits, and access policies.
Mutually exclusive with user_id.
Response
The newly created key (only response that contains the raw key)
The raw API key. Returned only at creation time and never stored
in plaintext — copy it immediately. Use this value as
Authorization: Bearer <key> (or x-api-key: <key>) on requests
to /v1/chat/completions, /v1/messages, and friends.
"bd-abcd1234ef56..."
