Create a key
1
Open Governance → Keys
Select the project the key belongs to, then choose Create key.
2
Name the key and choose an owner
Under Belongs to, pick a member to create a personal key: its traffic appears under that person’s name on People. Pick No one (shared key) for services, CI, and production apps. Binding a key to a member requires the Owner or Platform admin role.
3
Set a spend limit and expiry
Optionally set a Spend limit with a reset period of Day, Week, Month, or Total, and an expiry of Never, 7 days, 30 days, or 90 days.
4
Configure more options (optional)
Under More options, set a default workflow and the key’s scopes. Requests that do not send an
x-cave-workflow header are attributed to the default workflow.5
Copy the key
The full key and the gateway base URL are shown once. Store the key in your secret manager. Afterwards, the console only shows the key prefix.
Scopes
Scopes decide what a key can do. New keys get the two defaults.Per-key limits
Open a key to set its limits. A value of0 means unlimited. Key limits only narrow what the project allows in Governance → Access; they never widen it. Changes take effect on the next request.
IP allowlists only work when your Caveman operator has configured the trusted proxy ranges for the gateway’s ingress. Without that, the gateway sees the load balancer’s address and an allowlisted key refuses every request. The refusal message names the address the gateway observed.
Budget headers
When a key has a budget, gateway responses include its position so your app can react before it is cut off:Key status and lifecycle
Each key shows a status: Active, Near limit, At limit, Blocked, Expired, or Revoked. The list also shows when a key was last used and flags keys with no use in 90 days.
You can also manage keys through the API:
unblock, rotate, and revoke. Use PATCH /api/v1/projects/{id}/keys/{keyId} to update limits.
Best practices
- Issue one key per person and one per service, so spend and incidents trace back to an owner.
- Use separate keys for production, staging, and CI.
- Give experimental and autonomous-agent keys a hard budget and a spend-rate quota.
- Set an expiry on every key that does not need to live forever, and review keys flagged as unused.
- Rotate on a schedule and immediately after anyone with access leaves.