Spend caps
A spend cap refuses requests once spend reaches it. Nothing past the cap is billed. Set caps in the Console under Spend caps.
Kinds of cap
| Cap | Applies to | Resets |
|---|---|---|
| Daily and monthly, per key | Every call made with that key | At 00:00 UTC each day or on the 1st of the month |
| Daily and monthly, per organisation | Every call in the organisation | At 00:00 UTC each day or on the 1st of the month |
| Per agent run | One run (one agent session). The key’s cap when it has one, else the organisation’s | Never: start a new session |
| Per request | One request’s worst case: the model, the prompt and the full output limit | Checked per request |
- Caps are in your wallet’s currency. Changing the wallet currency clears them.
- A member cannot set a key’s run cap above the organisation’s; owners and admins can.
- A call whose run could not be worked out is not checked against the per-run cap; the other caps still apply.
When a cap is checked
- A cap is checked before the balance, so a top-up does not lift it.
- Calls still running count at their worst case until they finish. While only those could reach a cap, new calls get 429
spend_cap_pendingwithRetry-After; once spend itself reaches the cap, the answer is 402spend_cap_reached.
What a refused request looks like
| Status | Code | When |
|---|---|---|
| 402 | spend_cap_reached | Spend has reached a daily or monthly cap of the key or the organisation, or the agent run’s cap. |
| 402 | request_cost_cap_exceeded | This request’s worst case (the model, the prompt and the full output limit) is over the per-request cap. |
| 403 | key_paused | The key is paused, usually by the runaway-spend detector after its spend jumped far past its usual rate. |
| 429 | spend_cap_pending | Calls still in flight could reach a spend cap. |
HTTP/1.1 402 Payment Required
x-steerwise-spend-cap-scope: key
x-steerwise-spend-cap-window: month
x-steerwise-spend-cap-reset: <next month, 00:00 UTC>
{
"error": {
"message": "This key's monthly spend cap of <amount> is reached (<amount> spent this month). It resets at <date> 00:00 UTC. Raise the cap in the portal under Spend caps.",
"type": "insufficient_quota",
"param": null,
"code": "spend_cap_reached"
}
}| Header | Values | What it says |
|---|---|---|
x-steerwise-spend-cap-scope | key, org, run, request | Whose cap refused the call |
x-steerwise-spend-cap-window | day, month, run, request | The refusing cap’s window |
x-steerwise-spend-cap-reset | RFC 3339 time | When a daily or monthly cap starts again (00:00 UTC) |
Do not retry a 402 in a loopThe OpenAI SDKs do not retry a 402. If your agent framework retries every error, exclude 402 so a stuck loop stops.
Runaway spend
Steerwise also watches each key’s hourly spend against its usual rate. When spend jumps far past it, the organisation’s owners and billing members and the key’s owner are told, and the key can be paused. A paused key gets 403 key_paused until someone resumes it in the Console under Spend caps; calls already running finish and are billed.