
🇺🇸 English

🇺🇸 English
- Chat Models
- Chat
- OpenAI-Realtime
- Completions
- Audio
- Image generation
- Embeddings
- Models
- Help
- Anthropic
- Suno
- Udio
- Midjourney API
- Flux
- Recraft
- Ideogram
- Luma
- Runway
- Kling-API
- Replicate
- MiniMax
Speech
POST
/v1/audio/speech
最后修改时间:2025-02-05 11:13:45
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后 拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Content-Type
string
必需
示例值:
application/json
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 -g --request POST '/v1/audio/speech' \
--header 'Authorization: Bearer ' \
--header 'Authorization;' \
--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"
}