- 模型接口
- 聊天接口(Chat)
- 自动补全接口(Completions)
- 图像接口(Images)
- 向量生成接口(Embeddings)
- 音频接口(Audio)
- Midjourney
- Suno音乐(逆向)
- Flux图像(官方格式)
- Recraft图像(官方格式)
- Stability AI图像(官方格式)
- Ideogram图像(官方格式)
- Ideogram图像(逆向)
- Kling视频(官方格式)
- Luma视频(逆向)
- Runway视频(官方格式)
- CogVideoX视频(官方格式)
- Viggle舞蹈(逆向)
- 帮助中心
TTS文本转语音
POST
/v1/audio/speech
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Query 参数
string
可选
Header 参数
Content-Type
string
必需
示例值:
application/json
Authorization
string
必需
示例值:
Bearer {{YOUR_API_KEY}}
string
可选
Body 参数application/json
model
string
必需
input
string
必需
voice
string
必需
response_format
string
可选
speed
number
可选
示例
{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/audio/speech' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}
修改于 2024-07-09 11:08:43