API error
insufficient_credits
HTTP 402 · no credit is used for a request that ends in an error.
The account has no credits left for this request (or not enough for a bulk job).
What to do
Buy a credit pack in the dashboard, then retry. Nothing was charged for the failed request.
Retry
After you fix the account. When and how often to retry any error: retrying safely.
The answer
{
"error": {
"code": "insufficient_credits",
"message": "Not enough credits. Buy a pack to continue.",
"request_id": "req_7Hq2LmX9cV4bN8tR1zK6wD"
}
}Branch on code, which is stable; message is for people and may change. Keep request_id in your logs.
Headers that come with it:
X-Request-Id: Our ID for the request (same asrequest_idin bodies).
Endpoints that can answer it
GET /v1/validate(402)POST /v1/validate(402)POST /v1/bulk/{id}/start(402)