Creating a key
- Open the dashboard → API keys.
- Click Create key, give it a name, choose its scopes (all ticked = unrestricted), and copy the value.
Using a key
Send it in theAuthorization header as a Bearer token:
api_key:
Key format and failures
All errorbar keys start withsk_sovereign_. A missing, malformed, or
revoked key returns 401 with the standard envelope, so one parser handles
auth failures and every other refusal:
GET /v1/setup/status: a 200 proves the key is live and reports where
your workspace is in the setup, including what to do next. Send
Accept: text/plain for flat key=value lines if you’re parsing from a
shell script.
Key permissions and roles
A key is not just a workspace pointer. Every key acts as the user who minted it, and permission checks run against that user’s workspace role per operation:- Read endpoints work with any workspace key. (The training surfaces: GRPO, RAFT rounds, environment tools, and model versions, are the exception: they require owner/admin even to read.)
- Endpoints that spend money or redirect traffic require the minting user
to be a workspace owner or admin, and return
403otherwise: creating dedicated endpoints, fine-tuning jobs, GRPO runs, eval runs, datasets, labels, judges and anything that judges (calibration, scans, suggestions, auto-improve), and alias repoints.
429 with a
Retry-After header.
Key scopes
Roles say what the person may do; scopes narrow what one key may do on the management API, so the token a CI job uses to read a gate verdict is not also a token that can repoint production. Scopes are checked on every/v1 management call, before the role check, and a call that fails the
scope check never reaches the service.
The scope a call needs is derived from the request itself (method plus the
first path segment after
/v1), never declared per route, so a new write
surface is protected the day it exists: any write path not listed above
falls to platform:write.
How a key gets its scopes:
- Pick them in the Create key dialog on the dashboard’s API keys page. Every scope
starts ticked; untick to narrow.
readcannot be unticked, because any scope impliesread: a key that may write evals may read them. The CI-gate key is Read alone. - Keys minted before scopes existed carry no scope list and keep full
access; the key table shows them as
full access. Nothing already wired changes. - Scopes are fixed at creation. To narrow a key, mint a new one and revoke the old.
- Inference through the gateway is a different surface and ignores scopes: a
read-only key still serves chat completions.
403 with code insufficient_scope
and names the scope it needed:
platform:write key minted by a regular member
still gets 403 (insufficient_permissions) on the owner/admin endpoints,
because the key never outranks the person who minted it.
Revoking a key
Revoke any time from the dashboard. Revocation is checked on every request, so it takes effect immediately: there is no cached session to wait out. Each key’s last-used time is tracked, which makes stale keys easy to spot before you rotate.Provider keys for bring your own key are a
separate thing: they are stored encrypted and write-only, and never work as
errorbar API keys.
Best practices
Never commit keys to source control
Never commit keys to source control
Load keys from environment variables or a secrets manager. A key in a public
repo should be treated as compromised: revoke it.
Use separate keys per environment
Use separate keys per environment
Create distinct keys for development, staging, and production so you can
revoke one without affecting the others, and attribute usage clearly. The
per-key table in Observability shows exactly
which key is doing what.
Rotate periodically
Rotate periodically
Create a new key, roll your services over to it, then revoke the old one.
Last-used timestamps confirm the old key has gone quiet before you revoke.