# Credits

> One balance for every tool. How credits are reserved before a run, charged per result and released afterwards.

All tools draw from **one credit balance** per organization. You pay per result: each tool lists how many credits one result costs (the `credits` field in `GET /api/v1/tools` and in the [tool reference](/docs/tools)).

## Free credits [#free-credits]

New accounts start with **2,000 free credits** for a 7-day trial, no card needed. Trial credits that are left after 7 days expire.

## Buying credits [#buying-credits]

On the [Billing](/app/billing) page you can pick a monthly plan or top up once:

| | Price | Credits |
|---|---|---|
| Starter plan | $19 / month | 8,000 every month |
| Growth plan | $49 / month | 22,000 every month |
| Pro plan | $99 / month | 46,000 every month |
| Top-up | $10 / $25 / $100 | 4,000 / 10,000 / 40,000 |

Credits you pay for stay valid for **3 months**. We always use the credits that expire first, and expired credits leave your balance in a daily sweep (so for up to a day after the date they can still show up). Invoices come from Stripe by email and are listed under "Manage billing", where you can also change or cancel a plan (a plan change starts with your next billing date).

## What a run costs [#what-a-run-costs]

```
cost = number of results you receive × credits per result
```

Results that fail are not charged. A run that returns nothing costs nothing.

## Reserve, charge, release [#reserve-charge-release]

Credits move in three steps, so parallel runs can never spend more than you have:

1. **Reserve.** Before the run starts, credits for the most results it can return are set aside: `maxResults × credits per result` (20 results if you do not set `maxResults`, at most 200). If your balance is too low, the run does not start and you get `402 INSUFFICIENT_CREDITS`.
2. **Charge.** When the run ends, you are charged for the results you actually received.
3. **Release.** The rest of the reservation goes back to your balance in the same step.

This also happens when a run stops early or crashes: you pay for what you got, the rest is released, and no credits stay locked.

**Example.** A tool costs 1 credit per result. You start a run with `"maxResults": 50`, so 50 credits are reserved. The run returns 12 results: you are charged 12 credits and 38 go back to your balance.

## Check your balance [#check-your-balance]

```bash
curl "https://pullwire.dev/api/v1/me" -H "x-api-key: $PULLWIRE_API_KEY"
```

Every run also reports its own `creditsUsed`.

## Too few credits [#too-few-credits]

If your balance cannot cover the reservation, lower `maxResults` so the reservation fits. A request with invalid input is rejected before anything is reserved, so it never costs credits.
