Format
ak-marks the string as an API key.- Access id — 32 hex characters, a UUID with the hyphens stripped. This is the public half; it is how the key is looked up.
- Secret — appended directly after, no separator. This is the half that is verified.
Sending one
The management API accepts an API key four ways:Authorization: Bearer is tried as a JWT first, then falls back to API-key validation — but prefer one of the explicit forms above.
MCP gateways and the agent gateway both accept an API key as a bearer credential, disambiguated by the ak- prefix.
Where a key’s authority comes from
This is the part worth internalizing. An API key carries no permissions of its own. It identifies a principal, and that principal’s role and grants decide what the request may do. The practical consequence: you scope a key by scoping the service account you mint it on. A service account is Restricted — it authorizes nothing until you grant it something. Give it exactly the grants it needs, then mint its key. Narrowing later means changing that principal’s grants; there is no per-key control to reach for.Lifecycle
A key is live from the moment it is created until you delete it. There is no expiry to set, so a key does not age out on its own — deleting it is the control. Deleting takes effect on the next request: the record is removed, and anything still presenting that key stops authenticating.Getting one
Every key belongs to a service account — a named principal you scope with grants, and can audit and delete independently of any person. There is no personal key bound to your own sign-in identity. In the Portal: Settings → API Keys. Create the service account there, then mint a key on it. Settings → Users is the roster of the humans on your account; no key is issued from it.API key or device flow?
Use a key when nobody is at the keyboard. Use the device flow when a person is, and their identity should be on the record.
Practical guidance
- Environment variables or a secret manager. Never version control, never a config file you commit.
- One key per consumer. A shared key cannot be deleted without breaking everything that shares it.
- Scope the principal, not the key. It is the only scoping that exists.
- Delete on suspicion. It is instant and cheap; rotating later is neither.
Next steps
- Generating and managing API keys — the step-by-step, including creating the service account
- Roles and permissions — how to scope that principal