AI Model APIAudio
Text-to-Speech
Converts text to audio
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
model*string
input*string
要转换的文本
Length
length <= 4096voice*string
Value in
"alloy" | "echo" | "fable" | "onyx" | "nova" | "shimmer"response_format?string
Default
"mp3"Value in
"mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"speed?number
Default
1Range
0.25 <= value <= 4Response Body
audio/mpeg
curl -X POST "https://api.example.com/v1/audio/speech" \ -H "Content-Type: application/json" \ -d '{ "model": "tts-1", "input": "string", "voice": "alloy" }'"string"How is this guide?
Last updated on