- 发出请求
- 完成对象
- 模型接口
- OpenAI
- 文本生成POST
- 图片理解POST
- 图片生成 / gpt-image-1POST
- 图片生成 / dall-e-3POST
- 图片编辑 / edits接口POST
- 图片编辑 / 网页版POST
- 函数调用POST
- v1/Responses / 通用POST
- 创建文本嵌入POST
- 批量创建嵌入POST
- 文本转语音 / TTSPOST
- 语音转文本 / whisper-1POST
- 语音转文本 / gpt-4o-transcribePOST
- 音频翻译 POST
- Audio接口 / 输出POST
- Audio接口 / 输入POST
- 内容补全接口POST
- 图片变体生成POST
- 创建内容审核POST
- PDF文件分析POST
- deep-research / 联网搜索POST
- Web search / 联网搜索POST
- CodexPOST
- 列出模型GET
- response_formatPOST
- N测试POST
- xAI / OpenAI兼容接口
- Anthropic / OpenAI兼容接口
- Anthropic / 原生接口
- Google / OpenAI兼容接口
- Midjourney
- 文生图接口
- Realtime (实时语音、对话)
- GPTs 相关
- 文生音乐
- 文生视频
- Rerank API
- Python配置方式
- 帮助中心
文本转语音 / TTS
主站接口①
https://api2.aigcbest.top/v1
主站接口①
https://api2.aigcbest.top/v1
POST
https://api2.aigcbest.top/v1
请求参数
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",
"response_format": "wav"
}
示例代码
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://api2.aigcbest.top/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",
"response_format": "wav"
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{
"model": "tts-1",
"input": "The quick brown fox jumped over the lazy dog.",
"voice": "alloy"
}
修改于 2025-06-26 00:14:37