You hit your spend cap or want to bump it preemptively. The cap is per-key and applies to the combined LLM and voice spend.
Minimum cap
The minimum spend cap is 2000 cents ($20). Below the floor, the PATCH /api/provider-keys/[id] endpoint returns a 400 validation error. The minimum protects against accidental zero-cap keys that would block every request. Pass null to remove the cap entirely.
From the dashboard
- Open
/dashboard/llm. - Click the key card you want to update.
- Click Edit cap.
- Enter the new value in cents (the dashboard renders dollars but submits cents).
- Click Save.
The dashboard issues PATCH /api/provider-keys/[id] with body { "spendLimitCents": 20000 } for a $200 cap. Same endpoint accepts { "spendLimitCents": null } to remove the cap. (The cap is set from the dashboard or this API — there is no crabglamp keys CLI command for it.)
When the change takes effect
- The new cap is saved immediately.
- The proxy picks it up and enforces it on every request within about two minutes.
What happens when the cap is reached
The proxy returns HTTP 429 with body { "error": "Monthly spend limit reached", "limit": <cents>, "current": <cents> }. Subsequent requests with the same key also return 429. The dashboard card flips to a red banner indicating the cap is reached.
Accrued spend resets each invoice period. The cap itself does not reset; it stays the value you set until you change it again.