Portkey budgets
Portkey budgets cap spend per API key, workspace, and config — blocking requests when limits are reached instead of draining the org credit pool.
Hub: Tokenminning with Portkey.
This page answers portkey budget, portkey spending limit, and portkey cost control.
Set API key budgets
In the Portkey dashboard:
- Go to API Keys → create or edit a key
- Set budget limit and reset period (daily, monthly)
- Assign the key to one environment (dev, CI, prod)
| Key | Budget | Model access |
|---|---|---|
| Dev | $50/mo | Mini + sonnet |
| CI | $10/mo | Haiku only |
| Prod | Team cap | Per config override |
Config-level overrides
Config overrides let you enforce model allowlists and parameter limits per route:
{
"override_params": {
"model": "gpt-4o-mini"
},
"model": "gpt-4o-mini,gpt-4o"
}CI configs should allow only cheap models. Production configs can include fallbacks to capable tiers.
Workspace isolation
Separate workspaces for engineering agents vs customer-facing features. Analytics attributes spend per workspace for cost attribution.
Spending guardrails
- Budget on every API key — no shared unlimited keys
- Config override to lock CI to mini/haiku
- Alert when workspace reaches 80% of monthly cap
- Rotate keys when a tool leaks into the wrong environment
Troubleshooting
Requests blocked mid-sprint — budget cap reached. Check Analytics for which model consumed the pool.
Budget not enforcing — verify the correct config is attached to the API key making requests.