Skip to main content
POST
Text to speech

Авторизации

Authorization
string
header
обязательно

Authenticate with a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

Тело

application/json
model
string
обязательно
Пример:

"tts-1"

input
string
обязательно

Text to convert

Maximum string length: 4096
voice
enum<string>
обязательно
Доступные опции:
alloy,
echo,
fable,
onyx,
nova,
shimmer
response_format
enum<string>
по умолчанию:mp3
Доступные опции:
mp3,
opus,
aac,
flac,
wav,
pcm
speed
number
по умолчанию:1
Требуемый диапазон: 0.25 <= x <= 4

Ответ

200 - audio/mpeg

Audio generated successfully

The response is of type file.