Skip to main content
POST
文本转语音

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required
Example:

"tts-1"

input
string
required

要转换的文本

Maximum string length: 4096
voice
enum<string>
required
Available options:
alloy,
echo,
fable,
onyx,
nova,
shimmer
response_format
enum<string>
default:mp3
Available options:
mp3,
opus,
aac,
flac,
wav,
pcm
speed
number
default:1
Required range: 0.25 <= x <= 4

Response

200 - audio/mpeg

成功生成音频

The response is of type file.