Skip to main content
POST
文本转语音

授权

Authorization
string
header
必填

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

请求体

application/json
model
string
必填
示例:

"tts-1"

input
string
必填

要转换的文本

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

成功生成音频

The response is of type file.