Spending, rate, IP, and expiration limits
Use key-level restrictions to reduce exposure and overspending risk.
Available controls
| Control | Purpose |
|---|---|
| Total spending | Maximum USD amount; 0 means unlimited |
| 5-hour limit | Limit short bursts of spending |
| Daily limit | Control maximum daily spending |
| 7-day limit | Control rolling-period spending |
| IP allowlist | Allow only specified IPs or CIDR ranges |
| IP blocklist | Reject specified IPs or CIDR ranges |
| Expiration | 7, 30, 90 days, or a custom time |
Suggested profiles
- Personal computer: low spending cap and 30/90-day expiration
- Server: fixed outbound IP allowlist and daily limit
- Temporary test: low total limit and 7-day expiration
- Production: separate keys by environment and rotate regularly