Skip to main content
POST
/
v1
/
audio
/
tts
Text to speech
curl --request POST \
  --url https://behaviq.io/v1/audio/tts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "voice": "alloy",
  "speed": 2.125,
  "format": "mp3",
  "instructions": "<string>"
}
'
{
  "audioBase64": "<string>",
  "contentType": "audio/mpeg"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

text
string
required
Minimum string length: 1
voice
string
default:alloy
required
speed
number
Required range: 0.25 <= x <= 4
format
enum<string>
Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
instructions
string
Minimum string length: 1

Response

Response for status 200

audioBase64
string
required
Minimum string length: 1
contentType
string
default:audio/mpeg
required