v4

latestOpenAPI 3.0.0raw.githubusercontent.com2026-05-23171869.8 KB
Voice

Upload a voice sample

Upload a voice sample to create a new voice prompt in the voice bank. The audio data must be base64-encoded. Maximum file size is 20 MB.

post/voice

Headers

x-api-keystring required

API Key

Request body

filenamestring required

Name of the audio file being uploaded

datastring required

Base64-encoded audio data

titlestring

Title for the voice prompt

textstring

Transcript of the spoken text in the audio sample

localestring

Language locale code of the voice sample

gender'MALE' | 'FEMALE' | 'NON_BINARY'

Gender of the speaker

ageinteger

Age of the speaker

speaking_stylestring

Speaking style descriptor

speaker_idstring

Optional external speaker identifier

publishboolean

Whether to make the voice prompt publicly available

Example request

{
  "filename": "voice_sample.wav",
  "title": "Professional Narrator",
  "text": "This is a sample recording for voice cloning.",
  "locale": "en-US",
  "gender": "FEMALE",
  "age": 35,
  "speaking_style": "narrative"
}

Response

Voice prompt created successfully

Example response

{
  "response": {
    "voice_prompt_id": "vp_12345abcde"
  }
}