Skip to main content
POST
/
api
/
voice_preview
cURL
curl --request POST \
  --url https://api.ultravox.ai/api/voice_preview \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "primaryLanguage": "<string>",
  "definition": {
    "elevenLabs": {
      "voiceId": "<string>",
      "model": "<string>",
      "speed": 123,
      "useSpeakerBoost": true,
      "style": 123,
      "similarityBoost": 123,
      "stability": 123,
      "pronunciationDictionaries": [
        {
          "dictionaryId": "<string>",
          "versionId": "<string>"
        }
      ],
      "optimizeStreamingLatency": 123,
      "maxSampleRate": 123
    },
    "cartesia": {
      "voiceId": "<string>",
      "model": "<string>",
      "speed": 123,
      "emotion": "<string>",
      "emotions": [
        "<string>"
      ]
    },
    "lmnt": {
      "voiceId": "<string>",
      "model": "<string>",
      "speed": 123,
      "conversational": true
    },
    "google": {
      "voiceId": "<string>",
      "speakingRate": 123
    },
    "generic": {
      "url": "<string>",
      "headers": {},
      "body": {},
      "responseSampleRate": 123,
      "responseWordsPerMinute": 123,
      "responseMimeType": "<string>",
      "jsonAudioFieldPath": "<string>"
    }
  }
}'
This response does not have an example.

Authorizations

X-API-Key
string
header
required

API key

Body

application/json
name
string
required
Maximum length: 40
definition
object
required

A voice not known to Ultravox Realtime that can nonetheless be used for a call. Such voices are significantly less validated than normal voices and you'll be responsible for your own TTS-related errors. Exactly one field must be set.

description
string | null
Maximum length: 240
primaryLanguage
string | null

BCP47 language code for the primary language supported by this voice.

Maximum length: 10

Response

The response is of type file.