Create an API key
- Go to Admin > Developers, open the API keys tab, and click Create API Key.
- Enter a name for the key.
- Choose an Access scope:
- Read-only: can create conversations, read agents and data sources.
- Admin: can also manage agents, triggers, and data source views, and export workspace analytics. See API scopes and permissions for the calls that need it.
- Under Spaces and Pods, add the Spaces and the Pods where the key needs to write, for example to upload files. Spaces and Pods have separate pickers: Add spaces and Add Pods. Every key can already read what all workspace members can read, including open Spaces, open Pods, and Company Data.
- Under Analytics, add the groups whose members’ analytics the key can read. An Admin key can access all analytics.
- Optionally, set a monthly cap. Leave it empty for no cap. See Cap what a key can consume.
- Click Create, then copy the key. It stays visible for 10 minutes only.
Review your keys
The table lists each key with its scope, the Spaces and Pods it can write to, when it was last used, and its status. Older keys can show the Read & write scope, which you can’t choose for new keys. Each key has one of these statuses:- Active: the key works.
- Capped: the key reached its monthly cap. Its API calls are refused until an admin raises the cap or the key’s usage over the counted period drops back under it.
- Revoked: the key no longer works.
Cap what a key can consume
Each key can have its own monthly cap. To change it, open the ··· menu on the key’s row and select Edit monthly cap. The cap’s unit depends on your plan:
On credit-priced plans, the cap uses the same unit as Analytics, so you can compare a key’s credits in Analytics with its cap directly.
To limit all programmatic usage in the workspace instead of a single key, see Credit management.