KEY_SPEND_CAP_REACHED
The key has spent its daily credit cap
The key, publishable or secret, was created with a daily credit cap and has reached it today. The counter resets each day.
- http status
- 429
- credits
- Nothing is billed for a failed request.
What it means
A daily cap protects your balance from a form that is being abused or a script that runs away. Only what a lookup bills counts towards it: undeliverable verdicts inside your email fair use, unverified answers, reserved and unallocated ranges, cache hits and test addresses are free and never move the counter. One credit pays for five answered IP lookups, so only the IP lookup that opens a block moves it, by 1.
For a secret key the counter adds up what single and batch calls bill (meta.credits_used). Bulk runs bill in the background and are not counted, but creating one is refused once the cap is reached. A batch is also stopped by the cap mid-list: it answers 200 with the items already paid for and meta.stopped_reason set to key_spend_cap, so one large batch can never overspend the cap. An IP batch that reaches the cap first uses up the lookups its last credit already bought, which cost nothing more, and stops before it would open another block; a single call is refused as soon as the cap is reached.
What to do
Wait for the daily reset, or create a key with a higher cap. The form widget never blocks the visitor's submit when a lookup is refused.
Example response
{
"success": false,
"error": {
"code": "KEY_SPEND_CAP_REACHED",
"message": "This publishable key has reached its daily credit cap. The counter resets each day.",
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}Every error carries the request_id also sent in the X-Request-Id header; quote it when writing to support.
Related
- RATE_LIMITED · more requests than the limit allows
- All error codes
- Verdicts and the risk score
- API reference
markdown version: /docs/errors/KEY_SPEND_CAP_REACHED.md