Credits and billing
How credits are reserved, settled and refunded, how packs are bought, and where invoices live.
The lifecycle of a call
- Reserve. Before the request runs, Swarm reserves an estimate of the maximum cost (with a safety margin, 115% by default). If your balance cannot cover it, the call fails with
402 INSUFFICIENT_CREDITSand nothing is sent upstream. - Call. The request goes to the provider. Streaming responses are relayed as they arrive.
- Settle. When the call ends, the reservation is replaced by the real debit: input tokens and output tokens multiplied by the model's credit multipliers. The unused part of the reservation returns to you.
- Refund. A provider error, or a client that disconnects mid-stream, refunds the reservation. A sweeper also refunds any reservation left open for more than 15 minutes.
What a credit costs
Each model has an input and an output multiplier, expressed in credits per 1,000 tokens (see Models). Cost = input tokens × input multiplier / 1000 + output tokens × output multiplier / 1000. The response reports whether token counts came from the provider (token_source) and how many were cached.
Packs
Credits are sold in prepaid packs, shown with live prices in the pricing section and in the central catalogue. A pack is a one-time payment: no subscription, no expiry. Each payment is credited exactly once, even if a notification is delivered twice.
Limits that protect your balance
- Per-user rate limit: 60 requests per minute with a burst of 10 (
429 RATE_LIMITEDwithRetry-After). - A platform-wide daily spend cap guards against runaway use.
Invoices and payment methods
Account, organization and invoice management is centralised at auth.thundera.eu/settings.