Skip to main content
Every request authenticates with an API key passed as a Bearer token. One key works for everything: inference, and the whole management API (logs, judges, evals, training, dedicated endpoints, aliases), unless you narrow it with scopes at creation.

Creating a key

  1. Open the dashboard → API keys.
  2. Click Create key, give it a name, choose its scopes (all ticked = unrestricted), and copy the value.
Your key is shown once, at creation — errorbar stores only a hash and can’t show it to you again. If you lose it, revoke it and create a new one.
Every key belongs to a workspace. All usage, billing, and resources created with a key are scoped to that workspace.

Using a key

Send it in the Authorization header as a Bearer token:
With the OpenAI SDK, set it as the api_key:

Key format and failures

All errorbar keys start with sk_sovereign_. A missing, malformed, or revoked key returns 401 with the standard envelope, so one parser handles auth failures and every other refusal:
The cheapest way to verify a key works, and see which workspace it lands in, is 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 403 otherwise: 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.
The practical consequence: a key minted by a regular member is a safe read-and-infer credential, and revoking a person’s admin role also downgrades what their existing keys can do. Mint CI keys from an admin account deliberately, not by accident. Money-creating endpoints additionally carry a per-workspace abuse guard (default 20 requests per 60 seconds); past it you get 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. read cannot be unticked, because any scope implies read: 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.
A call outside the key’s scopes returns 403 with code insufficient_scope and names the scope it needed:
Scopes and roles compose: a 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

Load keys from environment variables or a secrets manager. A key in a public repo should be treated as compromised: revoke it.
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.
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.