POST
/
v1
/
voices
/
{voice_preset_id}
/
sample
curl --request POST \
  --url https://api.bland.ai/v1/voices/{voice_preset_id}/sample \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '{
  "text": "<string>",
  "voice_settings": {}
}'
(Generated audio file)

Headers

authorization
string
required

Your API key for authentication.

Path Parameters

voice_preset_id
string
required

The unique identifier for the voice preset to be used for generating the sample.

Request Body

text
string
required

The text content to be spoken in the voice sample.

Character limit: 200 characters.

voice_settings
object

Alternate voice_settings can be passed in to override the preset’s default settings.

Response

sample
audio

The generated audio file of the spoken text using the specified or overridden voice preset settings.