Authentication
Every request carries an API key from this console. The key says which workspace the usage belongs to.
API keys
Create keys on the API Key page. A key belongs to the workspace it was made in and works for every voice endpoint. Owners and admins can copy a key again from that page after a recent sign-in; each copy is logged. A key made with copying turned off is shown once, when it is created. Lost one of those? Revoke it and make another.
Keys start with yoob_live_ or yoob_test_. Make one key per environment or service, so you can revoke one without breaking the others.
Using a key
Send it as a bearer token on every request to https://tts-api.yoob.com/v1:
curl https://tts-api.yoob.com/v1/models \
-H "Authorization: Bearer $YOOB_API_KEY"The realtime sockets take the same header when they connect. A client that cannot set headers can send the key as the first message instead: {"type": "auth", "api_key": "..."} on transcription, or api_key in the config message on speech.
A request without a key, or with one that is wrong or revoked, gets 401:
{"error": {"message": "Incorrect API key provided.", "type": "invalid_request_error", "param": null, "code": "invalid_api_key"}}Keep keys secret
A key spends your workspace's credits, so it belongs on your server. Have your server call the API and pass the audio or text on to your app, the way this console's own demos do.
Revoking a key on the API Key page stops it within a minute: the API checks each key with the console and remembers the answer for up to 60 seconds.
Billing
Usage is charged in credits to the workspace that owns the key, at these rates (1 credit = $0.01). Your plan's monthly credits and any top-ups are on Plan & Billing, and what each key used is on Usage.
| Service | Mode | Rate |
|---|---|---|
| Text to speech | Best | 2 credits ($0.02) per 1K characters |
| Text to speech | Fast | 1 credit ($0.01) per 1K characters |
| Speech to text | Live | 10 credits ($0.10) per hour |
| Speech to text | Files | 5.5 credits ($0.055) per hour |
The human-or-AI score comes with every yoob-asr-1 transcript at no extra cost. Full plan details are on Pricing.