Every endpoint on this page requires
Authorization: Bearer sk_live_YOUR_API_KEY, except a signed sample URL.
Resources are scoped to the organization associated with the credential.Endpoints
Generate a sample
Response (200 OK)
Pricing and caching
A fresh generation costs 3¢ from your prepaid balance. Repeating an identical request — same voice, language, and text — is served from cache, costs nothing, and returns"cached": true with a fresh signed URL. That
also means expired URLs are cheap to replace: re-send the same request and
you get a new one free.
Generation is limited to 30 fresh samples per organization per hour; cache
hits don’t count against the limit.
Fetch the audio
Theurl in the response is a signed link to:
GET /v1/voices/previews/{id}?sig={signature}
It streams audio/mpeg without an Authorization header, so you can hand it
straight to an <audio> element or a media player. Signed URLs are valid
for 7 days. You can also call the endpoint without sig while
authenticated:
401 Unauthorized. A sample generated for another
organization’s custom voice returns 404 Not Found.
Errors
The
402, 422, and 429 responses share one shape:
422 means the voice exists but ThunderPhone can’t generate ad-hoc
samples for it in that language yet — the voice still works normally on
calls. Pick another voice or language for the sample.