API ReferenceCore concepts
Credits & billing
Usage is metered in characters. Every response echoes your remaining balance.
Usage is metered in characters. Your key carries a total allocation and a running used count; the difference is your available balance.
| Endpoint | Cost |
|---|---|
| Text to speech | 1 character per character of text |
| Clone a voice | Free, 0 characters |
| List voices · List cloned voices | Free |
| Delete a voice | Free |
Voice cloning plans
Cloning is free, but it's a plan feature: your key needs at least 10,000 available characters to clone. Below that, the request returns 402 UPGRADE_REQUIRED with the required and available amounts.
Tracking your balance
Every text-to-speech and clone response includes a credits object, so you never need a separate balance call:
credits
"credits": {
"cost": 137, // charged by this request
"used": 137, // total used so far
"remaining": 49863, // what's left
"total": 50000 // your allocation
}You're never charged for a request you can't afford
If a request would exceed your balance it is rejected with 402 INSUFFICIENT_CHARACTERS before any audio is generated. Failed generations are never charged.
