credits_exhausted
Past the plan's monthly quota and the Repull credits that pay for usage beyond it have run out (or are paused). Top up to resume.
When it fires
You are past your plan's monthly request quota, and the Repull credits that pay for usage beyond it have run out, or are paused because an auto-recharge payment failed.
Requests within your quota are not affected; only requests beyond it are refused until there is credit again. Nothing about your data, listings or connections changes.
Response shape
Every Repull error follows the same envelope. The code is stable and safe to switch on.
{
"error": {
"code": "credits_exhausted",
"message": "<human-readable explanation of what went wrong>",
"docs_url": "https://repull.dev/docs/errors/credits_exhausted"
}
}How to fix
- Top up at https://repull.dev/dashboard/billing. Requests resume within a minute of the payment.
- Turn on auto-recharge on the same page so your integration never stops at a zero balance.
- If credits are paused after a failed recharge, update your card when you top up; the pause lifts with any successful payment.
- If you regularly use close to 100,000 requests a month, Starter includes them for $99 and costs less than credits.
Common gotchas
- Waiting does not help. Unlike
rate_limit_exceeded, this is a 402: there is noRetry-After, and retrying on a timer returns the same answer until you top up. - The error body includes
balance,limitandusedso you can show the state in your own tooling.GET /v1/usage/summaryreturns the same in itscreditsobject at any time. - See Credits and usage for how credits are charged.
Examples
curl
# Past the monthly quota with an empty wallet
curl -i https://api.repull.dev/v1/reservations \
-H "Authorization: Bearer $REPULL_API_KEY"
# HTTP/2 402
# {"error":{"code":"credits_exhausted","balance":0,"limit":1000,"used":1840,...}}
# Check the wallet at any time
curl https://api.repull.dev/v1/usage/summary \
-H "Authorization: Bearer $REPULL_API_KEY"
# { "credits": { "balanceUsd": 0, "active": false, "requestsCovered": 0, ... } }TypeScript
const res = await fetch('https://api.repull.dev/v1/reservations', {
headers: { Authorization: `Bearer ${process.env.REPULL_API_KEY}` },
})
if (res.status === 402) {
const { error } = await res.json()
if (error.code === 'credits_exhausted') {
// Retrying will not help — this needs a top-up (or auto-recharge).
console.error(`Repull credits exhausted (${error.used}/${error.limit} this month). Top up at https://repull.dev/dashboard/billing`)
return
}
}
// Watch the balance before it runs out: requests served on credits say so.
if (res.headers.get('X-Repull-Billing') === 'credits') {
const balance = Number(res.headers.get('X-Repull-Credit-Balance'))
if (balance < 5) console.warn(`Repull credits low: $${balance}`)
}If you're an AI agent
The workspace is past its plan's monthly request quota and its pay-as-you-go Repull credits are empty or paused. Do NOT retry on a timer — there is no Retry-After and the answer will not change. Tell the human to top up (or enable auto-recharge) at https://repull.dev/dashboard/billing; requests resume within a minute of the payment. Requests within the quota are unaffected.
Related
- Error reference — the full table of error codes
- Using Repull from AI agents — patterns for handling errors in agent loops
- Credits and usage
- Rate limits
Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.