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
bash
curl https://api.sawalni.com/v1/billing/balance \ -H "Authorization: Bearer YOUR_API_KEY"
Response:
json
{ "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.
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