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 create and modify resources and administer the workspace (members, analytics export).
- Under Spaces, add the Spaces where the key needs to write, for example to upload files. Every key can already read what all workspace members can read, including open Spaces 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 it can write to, when it was last used, and its status:- 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.