---
title: "credits_exhausted — Documentation"
canonical: "https://repull.dev/docs/errors/credits_exhausted"
description: "Repull API error credits_exhausted (HTTP 402): Past the plan's monthly quota and the Repull credits that pay for usage beyond it have run out (or are…"
updated: "2026-11-30T01:17:08.099Z"
commit: "2daa39623f74f7f66c5d5c1fe49c91638fb881c5"
---

# `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.

HTTP 402The workspace is over a plan cap. Trim usage or upgrade.

## 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.

```json
{
  "error": {
    "code": "credits_exhausted",
    "message": "<human-readable explanation of what went wrong>",
    "docs_url": "https://repull.dev/docs/errors/credits_exhausted"
  }
}
```

## How to fix

1. Top up at https://repull.dev/dashboard/billing. Requests resume within a minute of the payment.
2. Turn on auto-recharge on the same page so your integration never stops at a zero balance.
3. If credits are paused after a failed recharge, update your card when you top up; the pause lifts with any successful payment.
4. Or upgrade: the response carries \`upgrade\`, the cheapest plan that covers your usage, with its exact monthly price for your listings and a \`checkout\_url\` that opens checkout for that price. If you regularly use close to 100,000 requests a month, Starter includes them and costs less than credits.

## Common gotchas

- **Waiting does not help.** Unlike `rate_limit_exceeded`, this is a 402: there is no `Retry-After`, and retrying on a timer returns the same answer until you top up.
- The error body includes `balance`, `limit`, `used` and `resets_at` (when the monthly quota starts over), plus `upgrade` and `credits` (as on [rate\_limit\_exceeded](https://repull.dev/docs/errors/rate_limit_exceeded.md)), so you can show the state and the way on in your own tooling. `GET /v1/usage/summary` returns the same in its `credits` object at any time.
- See [Credits and usage](https://repull.dev/docs/credits-and-usage.md) 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

```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](https://repull.dev/docs/errors.md) — the full table of error codes
- [Using Repull from AI agents](https://repull.dev/docs/agents.md) — patterns for handling errors in agent loops
- [Credits and usage](https://repull.dev/docs/credits-and-usage.md)
- [Rate limits](https://repull.dev/docs/rate-limits.md)

Hit an error that isn't covered? Email [hello@repull.dev](mailto:hello@repull.dev) with the request id from the response headers.
