Credits
How credits are charged, when they're refunded, and how to top up
Credits are how Swarmz meters AI usage. Every time the agent does work — edits a file, scaffolds a project, runs a web search, spawns a sub-agent — it consumes credits. Each plan ships with a monthly credit allowance plus a small daily bonus that everyone gets, regardless of tier.
This page covers what each action costs, how the deduction logic actually works, when you get a refund, and how to top up if you run out before the monthly reset.
Cost per action
Credits are charged after the action completes, based on a combination of the action type and the actual token usage on the underlying Anthropic API call. The numbers below are the base costs:
| Action | Credits |
|---|---|
| Simple edit | 1 |
| Feature implementation | 3 |
| Complex change | 5 |
| Agent spawn (sub-agent runs in parallel) | 2 |
| Web search | 1 |
| Plan generation (the agent proposes a plan before executing) | 2 |
| Project scaffold (creating a new project from scratch) | 10 |
A "simple edit" is something like a one-line tweak, a CSS change, or a copy update. A "feature implementation" is a self-contained feature — a new component, a new page, a small refactor. A "complex change" touches multiple files or systems — auth flow, database schema migration, multi-component refactor.
The agent classifies the action automatically based on the prompt and the diff. You don't have to label anything yourself.
How deduction actually works
Swarmz keeps four separate credit pools per workspace, drained in this priority order:
Daily bonus — a small free credit grant, reset at 00:00 UTC. Always drained first.
Included credits — your plan's monthly allowance, granted at each billing cycle.
Rollover credits — prior-cycle unused credits, which expire after the configured rollover window.
Top-up credits — credits you bought separately. These never expire.
The 4-pool model means a heavy day burns through your free bonus first, then your monthly allowance, before touching anything you paid for. You can see the breakdown anytime at Settings → Usage — there's a card per pool and a transaction log showing which pool each charge came from.
Each agent run produces one or more credit_transactions rows, one per pool drained. So a run that costs 10 credits when you have 5 daily bonus and 8 included credits left will create two transactions: one for 5 (bonus, drained to zero) and one for 5 (included).
When credits get refunded
If a run is aborted before the agent finishes, you only pay for what was actually generated. The deduction calculation runs after the abort and bills the partial token usage, not the full estimated cost.
If a run errors out — Anthropic returned a 5xx, the container crashed, the network blipped — you're refunded for the failed turn only. Earlier turns that completed successfully stay charged.
If you stop the agent mid-stream by clicking the Stop button, the abort flow:
- Cancels the in-flight Anthropic fetch via
AbortController. - Sets
runs.abort_requested = trueso the agent loop bails between turns. - Bills only the tokens consumed up to the abort point.
The deduction is computed from token counts in the model's response — input, output, cache reads, and cache writes are all metered, and the result is what you're charged.
Tracking usage
Open Settings → Usage in your workspace. The page shows:
- Current balance across all four pools
- Daily/weekly/monthly burn rate as a chart
- Per-project breakdown — which projects ate the most credits
- Per-action breakdown — which actions are most expensive
- Transaction log — every charge with timestamp, run ID, project name, pool drained
You can filter by date range, project, or pool. Click any transaction to see the underlying run and chat turn that triggered it.
The breakdown is the fastest way to spot a misbehaving prompt. If one project is suddenly burning credits 10x faster, look at the per-action chart — usually it's a runaway agent loop or a tool call gone wrong.
What happens when you run out
When the four pools sum to zero, the agent stops accepting new prompts. The chat input is disabled and a banner explains why with two options:
- Top up — buy a credit package (available from Settings → Usage → Buy credits)
- Upgrade plan — jump to the next tier; the new included credits are available immediately
Top-up packages don't expire and stack on top of your monthly allowance — so a fresh top-up sits in the top-up pool, untouched, until your monthly and rollover pools are drained.
You'll also keep getting your daily bonus credits every day even at a zero balance — enough for a small number of simple edits to recover from a stuck state without paying.
Buying top-ups
Go to Settings → Usage and click Buy credits.
Pick a credit package.
Enter your payment details. Stripe handles the transaction — Swarmz never sees the card.
Credits land in your top-up pool within seconds and are immediately usable.
Top-ups are billed independently of your subscription and don't affect your renewal date.
A note on the daily bonus
Every plan ships with a small daily bonus pool. It resets atomically at midnight UTC. The reset is built into the deduction function and uses a row lock, so two simultaneous deduction calls can't double-reset or double-bill.
That means even if your account hits zero on every other pool, you can still run a few simple edits a day at no cost — enough to keep working on something small while you decide whether to top up.
Where to next
- Plans — included credits per tier
- Cloud pricing — Cloud usage rolls into the same allowance