- OpenAI通用接口
- 全能模型接口
- kimi
- 通义千问
- 智谱
- 秘塔搜索
- 讯飞星火
- 海螺
- deepseek
- Openai
- Suno(音乐)
- Midjourney(绘画)
- Flux(绘图)
- Recraft(绘图)
- Ideogram(绘画)
- Luma(视频)
- Runway(视频)
- 可灵(视频)
TTS文本转语音
测试中
POST
https://api.ecovai.cn/v1/audio/speech
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Content-Type
string
可选
示例值:
multipart/form-data
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
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 'https://api.ecovai.cn/v1/audio/speech' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: multipart/form-data' \
--data-raw '{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}'
返回响应
🟢200成功
application/json
Body
text
string
必需
示例
{
"text": "Hello, my name is Wolfgang and I come from Germany. Where are you heading today?"
}
修改于 2024-09-27 07:40:35