Spending Caps on API Keys
You can now set a spending cap on any API key. The cap is a dollar limit on what that key can spend in a billing period, and it applies to that key alone, so a development key or an unattended agent can’t draw down the credits the rest of your organization depends on.
Set a cap when you create a key, or add, change, or remove one from the key’s options menu on the API Keys page. The keys table shows each capped key’s spend for the current billing period next to its cap.
- Owners and Admins can set caps on any key in the organization. Developers can set caps on the keys they created.
- Keys without a cap behave exactly as before.
- When a key reaches its cap, its requests return
429with thespend_cap_exceedederror code.