curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-v3-tts",
"callback_url": "https://your-domain.com/callback",
"input": {
"text": "Hello! This is a test of the text to speech system, powered by ElevenLabs.",
"voice": "Rachel",
"stability": 0.5,
"timestamps": false,
"language_code": "en",
"apply_text_normalization": "auto"
}
}
'
{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-05-12T10:30:00"
}
}{
"code": 200,
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"code": 200,
"error": {
"message": "<string>",
"type": "<string>"
}
}ElevenLabs
ElevenLabs V3 TTS
ElevenLabs V3 TTS API 可使用列出的预设音色之一,将最多 5,000 个字符的文本转换为语音。可选的 ISO 639-1 语言代码可强制指定语言,时间戳可作为单独文件返回。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "elevenlabs-v3-tts",
"callback_url": "https://your-domain.com/callback",
"input": {
"text": "Hello! This is a test of the text to speech system, powered by ElevenLabs.",
"voice": "Rachel",
"stability": 0.5,
"timestamps": false,
"language_code": "en",
"apply_text_normalization": "auto"
}
}
'
{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2026-05-12T10:30:00"
}
}{
"code": 200,
"error": {
"message": "<string>",
"type": "<string>"
}
}{
"code": 200,
"error": {
"message": "<string>",
"type": "<string>"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
elevenlabs-v3-tts 将文本转换为语音音频。结果以任务 files 返回,与图像、视频和 3D 任务的标准响应结构一致。
模型
- elevenlabs-v3-tts - ElevenLabs V3 文本转语音生成
必填参数
- text:要转换为语音的文本
- 长度:
1-5000个字符
- 长度:
可选参数
- voice:用于语音生成的音色名称。支持的值:
Aria、Roger、Sarah、Laura、Charlie、George、Callum、River、Liam、Charlotte、Alice、Matilda、Will、Jessica、Eric、Chris、Brian、Daniel、Lily、Bill、Rachel - stability:音色稳定性,
0到1 - timestamps:布尔值。为
true时,时间戳可能作为额外的 JSON 文件返回 - language_code:可选的 ISO 639-1 语言代码,用于强制模型使用指定语言
- apply_text_normalization:
auto、on或off
注意事项
- 通过标准任务状态 API 查询状态,而不是音乐详情接口。
- 成功响应返回
files,其中生成的语音使用file_type: audio。 - 启用
timestamps且返回了时间戳时,时间戳会上传为timestamps.json,并作为单独的文件项返回,file_type: other。
授权
所有 API 接口都需要 Bearer Token 认证。
创建 API Key:登录 PoYo,进入 仪表盘 → API 密钥(poyo.ai/zh/dashboard/api-key),点击创建 Key。
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
响应
任务提交成功
Show child attributes
Show child attributes