Usage
Inspect the authenticated account and its API usage.
Account and balance
curl --fail --show-error https://api.sawtakarabi.ai/v1/me \
-H "Authorization: Bearer $SAWTAK_API_KEY"| Field | Meaning |
|---|---|
object | "me". |
user_id, email | Account identity. |
key | Key id and scopes. |
balance_usd | Balance as a decimal USD string. |
limits | requests_per_minute, concurrent_requests, generation_suspended, and voices_per_account. A null limit means no account-level cap. |
Daily usage
curl --fail --show-error https://api.sawtakarabi.ai/v1/usage \
-H "Authorization: Bearer $SAWTAK_API_KEY"Both endpoints require an API key; restricted keys need usage permission.
| Parameter | Default | Meaning |
|---|---|---|
start_time | 30 days before end_time | Inclusive Unix timestamp in seconds. |
end_time | Tomorrow at 00:00 UTC | Exclusive Unix timestamp in seconds. |
limit | 31 | Daily results per page, clamped to 1–366. |
after | — | Previous response's last_id. Keep the same date range. |
Dates and after must fall at UTC midnight. A range must span 1–366 days and start within the last 24 calendar months. Invalid ranges return 400.
The response contains object: "list", data, first_id, last_id, and has_more. Results are newest first, with one item per active day:
| Field | Meaning |
|---|---|
object | "usage". |
start_time, end_time | UTC day boundaries in Unix seconds. |
tts_characters | Speech input characters. |
cost_usd | Generation charges as a decimal USD string. |
Usage updates hourly and can lag during processing delays. Balance updates happen when requests settle. Totals include completed requests and charged partial streams; refunds and account credits are separate.