Billing & Credits
Sawalni uses a credit-based billing system. Credits are consumed based on API usage.
Credit Consumption
- Chat completions — Credits deducted based on input + output tokens
- Embeddings — Credits deducted based on input tokens
- Language identification — Credits deducted based on input bytes
- Transliteration — Credits deducted based on input bytes
- Speech transcription — Credits deducted based on audio duration (seconds)
- Speech synthesis — Credits deducted based on generated audio duration (seconds)
Checking Your Balance
curl https://api.sawalni.com/v1/billing/balance \ -H "Authorization: Bearer YOUR_API_KEY"
Response:
{ "balance": 1000.50, "currency": "credits" }
Adding Credits
Add credits from the Billing page in the portal. You can view your current balance and top up at any time. Credit reservations protect available funds across API keys and billable routes. A hold is not a charge. Known input and requested output can be reserved before work. Variable costs extend the same hold using measured usage before delivery. Unused funds are released after settlement. An interrupted request with unknown usage can keep a pending hold for verified reconciliation; pending holds are not estimated charges. Read reserved and available_balance as decimal credit amounts. A request refused for insufficient available credits before work does not consume product quota. Existing free and deferred billing policies are unchanged. Completed paid responses wait for durable credit confirmation. A confirmation outage returns HTTP 503; check usage before retrying.
Usage Tracking
Monitor your usage in real-time from the Dashboard:
- Daily and weekly usage charts
- Token breakdown (prompt vs completion)
- Usage by API key
- Remaining balance