Voice & Lip-sync API
Download OpenAPI DocumentText to speech, voice cloning, lip-sync and video processing for any clip.
Generate speech from text, clone voices from audio samples, and lip-sync videos to new speech. New here? Read Voice & Lip-sync for the whole flow.
Every request
Send your organization API key in the x-api-key header; it starts with uvk_. Create one in the Universe app under Settings → API keys. The key and organization limits count requests over a rolling minute. See Authentication and Rate limits.
Text to speech works in sessions of speech cards. Save the cards with Save a session, start each card with Generate speech, then poll Get a session until the card is done. Voice cloning creates a voice from samples with Clone a voice; once it is ready, use it in a speech card. Lip-sync re-times the lips in a video to new audio: Start a lip-sync, then poll Get a lip-sync job.
Work runs in the background, so every call returns straight away. Endpoints that charge credits say so on their page, with the current price; without enough credits they return 402 and nothing is created. See Credits.
List processes shows the history of all three in one list.
Lip-sync
Re-time the lips in a video to new speech, such as a dub. Pick a model, check the price, start the job and poll it until the video is ready.
- POST/v1/galaxy/playground/lip-sync/upload/presign
- GET/v1/galaxy/playground/lip-sync/models
- POST/v1/galaxy/playground/lip-sync/quote
- POST/v1/galaxy/playground/lip-sync
- GET/v1/galaxy/playground/lip-sync
- GET/v1/galaxy/playground/lip-sync/{id}
- POST/v1/galaxy/playground/lip-sync/{id}/retry
- POST/v1/galaxy/playground/lip-sync/{id}/download-url
- POST/v1/galaxy/playground/lip-sync/{id}/save-to-assets
Get a lip-sync upload URL
List lip-sync models
Price a lip-sync
Start a lip-sync
List lip-sync jobs
Get a lip-sync job
Re-run a lip-sync
Get a lip-sync download URL
Save a lip-sync to assets
Text to speech
A session holds speech cards: each card is one piece of text, a language and a voice. Save the cards, generate each one, then read or download the audio.
- PUT/v1/galaxy/playground/video-process/session/{sessionId}
- POST/v1/galaxy/playground/tts/generate
- GET/v1/galaxy/playground/video-process/session/{sessionId}
- POST/v1/galaxy/playground/video-process/session/{sessionId}/export-urls
- POST/v1/galaxy/playground/tts/sessions/{id}/save-to-assets
- PATCH/v1/galaxy/playground/video-process/session/{sessionId}
Save a session
Generate speech
Turn the text of one saved speech card into audio with the voice you choose. Save the card first with Save a session. The call returns straight away with status: RUNNING; poll Get a session until the card is COMPLETED (its outputUrl plays the audio) or FAILED. Generating a card again replaces its audio and is charged again.
Permission: playground.tts:create. An API key acts with the role of the member who created it.
Credits: Charged when generation starts, per second of speech, estimated from the length of the text and its language. When the audio is ready the charge is adjusted to its real length (never more than twice the estimate). Refunded in full if generation fails. Deleting the card or its session while it generates keeps the charge.
| Rate | What it covers | Price |
|---|---|---|
| Text to speech | Synthesizing speech in the video playground. Charged per second of generated audio. | 120 credits per minute |
Bodyrequiredapplication/json
Text to speak, up to 5,000 characters. Send the text of the card named in cardId; the card's pronunciation rules are applied to it before synthesis.
BCP-47 code of the speech, such as hi-IN. The voice must support it. Also used to estimate the length that is charged.
Provider the voice belongs to. It must be enabled for your organization. A cloned voice uses the provider of the clone.
The provider's voice ID: a voice from the voice catalog, or providerVoiceId of a cloned voice that is ready. A voice your organization may not use is refused with 400.
ID of the speech card to generate, as saved with Save a session. The audio is stored on that card. Returns 404, with nothing charged, when the card was never saved or has been deleted.
The session the card belongs to (the sessionId you saved it under with Save a session).
Name of the session, stored on the clip for display.
Display name of the voice, stored on the clip.
Gender of the voice, stored on the clip for display.
Type of the voice, stored on the clip for display (for example a marker for a cloned voice).
Tone of delivery, such as Happy. Providers that do not support it ignore it.
A UUID you create for this request. Send a new one for every generation; a retry that sends the same one again is refused with 409, so a speech clip is never generated and charged twice.
Responses
200Generation started. Poll the session for the result.
ID of this generation run.
The card being generated (the cardId you sent).
Always RUNNING. Poll Get a session until the card is COMPLETED or FAILED.
Credits charged now, estimated from the length of the text. Adjusted to the real audio length when the clip is ready; refunded if generation fails.
400Nothing was charged. A field failed validation, or: - `Text to synthesize is empty.` - `A speech card takes at most 5,000 characters — this one is <n>. Split it into smaller cards.` - `This text-to-speech provider is not enabled for your organization.` - `This voice is not available to your organization. Pick a voice from the voice library.`
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
402Not enough credits for the estimated length, or your organization owes credits. Nothing was started.
HTTP status code.
Always InsufficientCredits.
What happened, in plain words.
Credits this request needs.
Credits your organization can spend now.
Credits your organization owes from earlier jobs (0 when nothing is owed). While anything is owed, every paid request is refused until it is repaid.
403Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
404The card was never saved in your organization (`This card has not been saved yet. Wait a moment and try again, or reload the page.`) or has been deleted (`This card was deleted. Reload the page to see the session as it is now.`). Nothing was charged.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
409The card is already generating (`This card is already being generated.`), or this `requestId` was already used (`This speech was already generated from this request. Please wait for it to finish.`). Nothing was charged.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
422The text was blocked by content moderation (`This text can’t be turned into speech: it was flagged as <category>. Nothing was charged.`).
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
500Generation could not be started (`Speech generation is unavailable right now. Please try again.`). The card is marked failed and the credits are refunded.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
curl '{{API_BASE_URL}}/v1/galaxy/playground/tts/generate' \
--request POST \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"text": "Welcome to our quarterly product update.",
"targetLanguage": "hi-IN",
"provider": "elevenlabs",
"voiceId": "JBFqnCBsd6RMkjVDRZzb",
"sessionId": "3f2a9c1e-7b4d-4e8a-9c6f-1d2e3f4a5b6c",
"sessionName": "Product update narration",
"cardId": "8d7c6b5a-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
"voiceName": "George",
"voiceGender": "male",
"voiceType": "premade",
"emotion": "Neutral",
"requestId": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e"
}'{
"id": "b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"cardId": "8d7c6b5a-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
"status": "RUNNING",
"credits": 24
}Get a session
Get session download URLs
Save a session to assets
Rename a session
Voice cloning
Create a voice from audio samples of one speaker. Once it is ready, use its provider and providerVoiceId in a speech card.
Get a voice sample upload URL
Clone a voice
List cloned voices
Get a cloned voice
Retry a voice clone
Processes
One history of every text-to-speech session, voice clone and lip-sync job in your organization, with routes to read, download, rename or delete a single clip.