What are API Keys
API Keys are secure tokens required to authenticate and make requests to the AI Gateway. Each key is scoped to a single project and carries a set of permissions that control what it can do. Multiple keys can be provisioned for different environments (production, staging, development), purposes, or team members, providing granular control and auditing of access. Two key types are available, chosen by the key’s owner.User keys
Tied to a specific user account and project. Automatically revoked if the user is removed from the organization or project. Use user keys for personal use and local development.Service account keys
Not tied to any individual user, with a lifecycle independent of user membership. Only workspace admins can create service account keys. Use service account keys for production systems, so access does not break when a team member leaves.Viewing API Keys
Navigate to the API Keys page in the AI Gateway to see all keys in the workspace. The table shows the following columns:Creating an API Key
Open the creation panel

Configure owner, name, project, permissions, spending limits, and expiration when creating an API key.
Choose an owner
Set name and project
Set permissions
Set optional limits
- Cost Limit (in USD): caps the total spend for requests made with this key.
- Token Limit: caps the total number of tokens consumed.
- Requests/Min: caps the number of requests within a rolling 60-second window.
- Reset limit period: defines when the Cost and Token counters reset, allowing recurring budget allocations. Does not apply to Requests/Min, which always uses a 60-second window.
Set expiration (optional)
Create and copy the key
Permissions
Restricted permission resources
Restricted permission resources
Managing API Keys

API Keys list showing key name, status toggle, and action menu.
- Edit: update the name, permissions, limits, or expiration date. The owner type cannot be changed after creation.
- Duplicate: opens the creation panel pre-filled with the key’s current settings.
- Overview: view current usage against the key’s cost, token, and rate limits.
- Delete: permanently removes the key. This cannot be undone.
Legacy API Keys
Workspaces created before AI Gateway API keys were introduced may have legacy keys. Legacy keys continue to work but do not support the cost, token, and rate limits or the granular per-resource permissions available on new keys.
Legacy API key shown in the AI Gateway API Keys list.
- Go to API Keys in the AI Gateway sidebar.
- Click Create API Key and configure the required limits and permissions.
- Update any integrations or environment variables to use the new key.
- Disable or delete the legacy key once all consumers have switched.