Suonora API – User Balance
Check User Text-to-Speech Usage Balance
This endpoint returns the user's current monthly text-to-speech usage, including:
- Total included characters
- Used characters
- Remaining characters
- Overage characters if the user exceeded their plan
- Estimated overage amount in USD
Endpoint
GET https://api.suonora.com/v1/user/balance
Headers
Header | Value |
---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | application/json |
Example Request
sh
curl -X GET https://api.suonora.com/v1/user/balance \
-H "Authorization: Bearer YOUR_API_KEY"
Example Response
json
{
"success": true,
"balance": {
"total_credits": 300000,
"used_credits": 320000,
"remaining_credits": -20000,
"overage_characters": 20000,
"overage_amount_usd": 1.00
}
}
Response Fields
Field | Type | Description |
---|---|---|
total_credits | number | Total characters included in the user's plan for the month. |
used_credits | number | Total characters used by the user this month. |
remaining_credits | number | Characters remaining. Can be negative if usage exceeded the plan limit. |
overage_characters | number | Number of characters over the plan limit. |
overage_amount_usd | number | Estimated additional charge for overage, based on the plan rate. |
Notes
overage_amount_usd
is calculated based on the user's active subscription plan rate.- If the user stays within their limit,
overage_characters
andoverage_amount_usd
will both be0
. - This endpoint helps you monitor user consumption and notify users of potential extra charges.
Last updated on