v1.0.0OpenAPI 3.1.1

Voice & Lip-sync API

Download OpenAPI Document

Text 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.

Server
{{API_BASE_URL}}
Your API environment
Authentication RequiredApiKeyAuth
Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys.
x-api-key:
Client Libraries
Shell

Save a session

Generate speech

Auth Required

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

textstringrequired

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.

Example: Welcome to our quarterly product update.
targetLanguagestringrequired

BCP-47 code of the speech, such as hi-IN. The voice must support it. Also used to estimate the length that is charged.

Example: hi-IN
providerstringrequired

Provider the voice belongs to. It must be enabled for your organization. A cloned voice uses the provider of the clone.

Enum values:elevenlabscartesiamicrosoft
Example: elevenlabs
voiceIdstringrequired

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.

Example: JBFqnCBsd6RMkjVDRZzb
cardIdstring · uuidrequired

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.

Example: 8d7c6b5a-4e3f-4a2b-9c1d-0e9f8a7b6c5d
sessionIdstring · uuid

The session the card belongs to (the sessionId you saved it under with Save a session).

Example: 3f2a9c1e-7b4d-4e8a-9c6f-1d2e3f4a5b6c
sessionNamestring

Name of the session, stored on the clip for display.

Example: Product update narration
voiceNamestring

Display name of the voice, stored on the clip.

Example: George
voiceGenderstring

Gender of the voice, stored on the clip for display.

Example: male
voiceTypestring

Type of the voice, stored on the clip for display (for example a marker for a cloned voice).

Example: premade
emotionstring

Tone of delivery, such as Happy. Providers that do not support it ignore it.

Example: Neutral
requestIdstring · uuid

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.

Example: b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e

Responses

200Generation started. Poll the session for the result.
application/json
idstringrequired

ID of this generation run.

Example: b1c2d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e
cardIdstring · uuid | nullrequired

The card being generated (the cardId you sent).

Example: 8d7c6b5a-4e3f-4a2b-9c1d-0e9f8a7b6c5d
statusstringrequired

Always RUNNING. Poll Get a session until the card is COMPLETED or FAILED.

Enum values:RUNNING
Example: RUNNING
creditsnumberrequired

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.

Example: 24
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.`
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
402Not enough credits for the estimated length, or your organization owes credits. Nothing was started.
application/json
statusCodenumberrequired

HTTP status code.

Example: 402
errorstringrequired

Always InsufficientCredits.

Example: InsufficientCredits
messagestringrequired

What happened, in plain words.

Example: You don't have enough credits to start this. It needs 120; you have 45.
requirednumberrequired

Credits this request needs.

Example: 120
availablenumberrequired

Credits your organization can spend now.

Example: 45
owednumberrequired

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.

Example: 0
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.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
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.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
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.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
422The text was blocked by content moderation (`This text can’t be turned into speech: it was flagged as <category>. Nothing was charged.`).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
500Generation could not be started (`Speech generation is unavailable right now. Please try again.`). The card is marked failed and the credits are refunded.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
POST/v1/galaxy/playground/tts/generate
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

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.

List processes

Get a process

Get a process download URL

Rename a process

Models

CreateLipSyncMultipartDto
CreateLipSyncUploadDto
CreateStagedUploadDto
CreateVoiceCloneMultipartDto
DocumentUploadUrlResponseDto
DownloadUrlResponseDto
GenerateSpeechDto
GenerateSpeechResponseDto
InsufficientCreditsErrorDto
LipSyncQuoteDto
LipSyncQuoteResponseDto
LipSyncResponseDto
PlaygroundIdResponseDto
PlaygroundLipSyncModelOptionDto
RenameSessionResponseDto
RenameVideoSessionDto
SaveLipSyncToAssetsResponseDto
SavePlaygroundOutputToAssetsDto
SaveTtsSessionToAssetsResponseDto
SessionCardDto
SessionCardPronunciationDto
SessionCardVoiceDto
SessionExportUrlDto
SessionExportUrlsResponseDto
StaleSessionErrorDto
UpsertSessionDto
VideoProcessAssigneeDto
VideoProcessDto
VideoProcessGroupDto
VideoProcessListDto
VoiceCloneResponseDto