Skip to content

Organization API Keys

API keys are the recommended credential for server-to-server use. Each key is scoped to a single organization and automatically resolves that org’s billing account on every request — no X-Org-ID header needed.

All keys start with sk- and are shown once at creation time. Store them in your secret manager — they can’t be retrieved again.

In the console, switch to the organization the key is for, open API Keys in the sidebar, and select Create API Key. Enter a name and select Create key. The key is shown once.

On your own machine, aiand login from the ai& CLI creates a key named ai& CLI (aiand@<hostname>) after you approve the sign-in in your browser, and stores it for you.

Who sees which keys depends on the role, as described below. The console’s API Keys page uses these endpoints:

ActionEndpoint
List keysGET /api/v1/keys
Create keyPOST /api/v1/keys
Update key (display name, expiry)PATCH /api/v1/keys/{key_id}
Revoke keyDELETE /api/v1/keys/{key_id}

They are authenticated with the console’s session cookie and the X-Org-ID header, not with an API key. Use the console or the ai& CLI rather than calling them directly. A Member lists and revokes their own keys. Owners and Admins list every key in the organization and can revoke any of them, except that only the Owner can revoke the Owner’s keys: the API Keys page shows them My keys and All keys, and All keys names who created each. To rename one of your own keys, select Edit on its row. To revoke a key, select Revoke on its row, then Revoke key. Billing admins and Billing viewers cannot create keys.

Keys don’t auto-expire, except those created by aiand login: they last 30 days, and the ai& CLI rotates them automatically. Rotate other keys when:

  • A member with key access leaves.
  • A key is exposed (leaked logs, accidental commit).
  • Compliance policy requires periodic rotation.

Create the new key first, deploy it, then revoke the old one — this avoids downtime.