Skip to content
For AI agents: a documentation index is available at /llms.txt. Every docs page is also available as markdown: add .md to its URL. To connect, read /agents.md.

Errors

key_spend_cap_exceeded

The call would pass the API Key's monthly Credit cap.

Status

HTTP 402, title Key spend cap exceeded. One of the money errors. Branch on code, never on the status or the prose.

Retryable: no. Every body carries this as retryable: false, beside action and remedy: the same request will fail again until the request changes or a person acts.

Common causes

  • spent_credits + reserved_credits (Runs in flight) + estimate_credits exceed cap_credits.

What to do

Action: Wait until resets_at, or ask the Customer to raise the cap.

Nothing ran. Wait for resets_at or raise the cap.

Example

The body arrives as application/problem+json, with retryable and the remedy above. Most responses add detail about the occurrence, and some add fields of their own.

{
  "type": "https://www.shortsintel.com/docs/reference/errors/key_spend_cap_exceeded",
  "title": "Key spend cap exceeded",
  "status": 402,
  "code": "key_spend_cap_exceeded",
  "retryable": false,
  "action": "Wait until `resets_at`, or ask the Customer to raise the cap.",
  "remedy": "Nothing ran. Wait for `resets_at` or raise the cap."
}