API Access
API Key
Creating, copying, editing, disabling and deleting API keys on the API Keys page.
API keys are created and managed on the API Keys page of the dashboard, opened from API Keys in the profile menu. Each key belongs to the organization selected when it is created, and the page lists the keys of the selected organization. A key's value starts with sk-mr-, and each key also has an id starting with tok_, such as tok_4Gm8Rq2VxN, which Traffic records in place of the value.
Fields
An API key has the following fields:
| Field | Dashboard label | Description |
|---|---|---|
| Name | Key name | Up to 80 characters, such as production or support-bot. |
| Description | Description | Optional, up to 200 characters, such as who uses the key and where. |
| Scopes | Access | Full control, or a chosen set of scopes. See Scope. |
| Routers | Access, Inference | Any router, or a list of routers and aliases. See Router Access. |
| Expiry | Set when the key is created | The date after which the key stops working. |
| Status | disabled badge | Enabled, or disabled with the disabled badge. |
| Created | Created | The date the key was created. |
| Id | Token in Traffic | The key's id, such as tok_4Gm8Rq2VxN, recorded on each request. |
Creating a key
A key is created on the API Keys page:
- Open API Keys from the profile menu, and select New API key.
- Enter a Key name, and optionally a Description.
- Choose the key's access. A new key starts with the Inference only preset, which allows inference and listing models on any router. See Scope.
- Choose an expiry date for the key.
- Select Create.
The key appears in the list with its first characters shown, such as sk-mr-xYzQ followed by dots. Copy puts the full value on the clipboard.
Copying a key
A key's full value can be copied from the list at any time with Copy, including long after it was created. This lets a team add the same key to another system later, such as a second deployment, with the same key.
Expiry
An expiry date limits how long a key works. After the date, every request with the key is refused with 401, as for a disabled key, and the key stays in the list so its history in Traffic keeps its name. To keep a caller working, create a new key before the old one expires and move the caller to it.
Changing access
Access on a key's row opens the Access editor, which shows the key's description, scopes and routers. Edit makes them changeable, and Save applies the change. The key's value stays the same, so callers keep working with the new access within about a minute. See Scope and Router Access.
Disabling and deleting
Disable stops a key from working, and Enable restores it with the same value. Delete removes a key permanently and is available once the key is disabled, so a key in use is always switched off before it is removed. Deleting asks for confirmation. Requests already recorded in Traffic keep the key's id.
A change to a key, such as disabling it or changing its access, takes effect within about a minute.
Managed keys
A managed key is created by Self-Service Provisioning when a person sets up a tool such as Claude Code from the Portal. It allows inference on that person's own Claude Proxy, and for Claude Desktop also listing models. It shows the managed badge in the list, and its access is set when it is created and shown read-only in the Access editor. The person sees and copies the key in the Portal, where Issue a new key replaces it. See Self-Service Provisioning.
Keys in Traffic
Traffic records the id of the key that made each request, and the request detail shows it as Token. The id identifies the key while keeping its value private, and it is recorded whenever the router logs request metadata, including with Anonymous Metadata. Giving each application or person its own key makes their usage separable in Traffic. See Observability.
Practices
The following practices keep keys easy to manage and limit the effect of a leaked key:
| Practice | Reason |
|---|---|
| One key per application, environment or person | Usage is separable in Traffic, and one key can be disabled without affecting others. |
| The narrowest scopes that work | Most applications need only the Inference only preset. |
| A router list for single-purpose applications | A leaked key reaches only the routers it was made for. |
| An expiry date | A forgotten key stops working on its own. |
| A description of where the key is used | The right key is easy to find when it needs to be disabled. |