Voice generation API
Generate natural speech from your own applications using the same voices that power TataVoice agents. Authenticate with your API key from the dashboard (Developer API section, Business and Scale plans). Usage is billed from your prepaid wallet at 5¢ per 1,000 characters — the same wallet you top up for voice minutes.
Authentication
Pass your key as a bearer token (or an X-Api-Key header). Keep it server-side — anyone holding it can spend your credits. Regenerating the key in the dashboard revokes the old one instantly.
Authorization: Bearer tv_live_…
Generate speech
POST https://tatavoice.com/api/v1/tts — returns the audio file. Up to 5,000 characters per request.
curl https://tatavoice.com/api/v1/tts \
-H "Authorization: Bearer $TATAVOICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome to Noe Beach Bar. We are open from nine until late.",
"voice_id": "f039066f-cdb7-45ed-b51d-1034ae2f04a0",
"output_format": "mp3"
}' \
--output welcome.mp3
| Field | Type | Notes |
|---|---|---|
| text | string, required | What to say. Max 5,000 characters. |
| voice_id | string | Any voice from GET /api/v1/voices. Defaults to Cindy (receptionist). |
| output_format | string | mp3 (default, 128 kbps) · wav (24 kHz) · pcm (raw L16 16 kHz, for telephony) |
| model | string | sonic-3 (default). |
Every response includes X-Credits-Charged-Cents and X-Credits-Balance-Cents headers so your app can track spend without extra calls.
List voices
GET https://tatavoice.com/api/v1/voices — all available English voices with descriptions. Free to call.
curl https://tatavoice.com/api/v1/voices \
-H "Authorization: Bearer $TATAVOICE_API_KEY"
{"voices": [{"voice_id": "f039066f-…", "name": "Cindy Baker - Receptionist",
"description": "Smooth, welcoming adult female …"}, …],
"default_voice_id": "f039066f-…"}
Python example
import httpx
res = httpx.post(
"https://tatavoice.com/api/v1/tts",
headers={"Authorization": "Bearer tv_live_…"},
json={"text": "Your table for four is confirmed for eight o'clock tonight."},
timeout=60,
)
res.raise_for_status()
open("confirmation.mp3", "wb").write(res.content)
print("charged:", res.headers["X-Credits-Charged-Cents"], "cents")
Billing & errors
- 5¢ per 1,000 characters (rounded up, minimum 1¢), charged only on success.
- Rate limits are a plan feature: Business 30 requests/min · Scale 120 requests/min.
- 402 — not enough wallet credit: top up from the dashboard.
- 401 — missing or revoked API key.
- 403 — your plan no longer includes API access.
- 413 — text over 5,000 characters: split into multiple requests.
- 429 — plan rate limit reached; honor the
Retry-Afterheader. - Charges appear in your dashboard's wallet history as “TTS API”.