ElevenLabs Multilingual V2 与 Turbo V2.5
通过 AI Video API 的异步音频接口,使用 ElevenLabs 生成自然的多语言语音。两个模型均支持内置音色、相似度与稳定性调节,以及文本内停顿。
模型与计费
按照 input.text 的 Unicode code point 数量计费。每次请求最低按 1,000 个字符计费,单次输入最多 10,000 个字符。
| 模型 | 每字符积分 | 最低消费 |
|---|---|---|
elevenlabs/multilingual-v2 | 0.03 | 30 积分 |
elevenlabs/turbo-v2.5 | 0.015 | 15 积分 |
Emoji 等辅助平面 Unicode 字符各按一个字符计算。提交前可调用 POST /v1/estimate,其结果与创建任务时预扣的积分一致。
创建任务
curl -X POST https://api.aivideoapi.ai/v1/audio/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "elevenlabs/multilingual-v2",
"callback_url": "https://your-server.com/webhook",
"input": {
"text": "欢迎使用 ElevenLabs。<#0.8#> 现在开始。",
"voice_id": "Alice",
"similarity": 1,
"stability": 0.5,
"use_speaker_boost": true
}
}'
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | elevenlabs/multilingual-v2 或 elevenlabs/turbo-v2.5 |
input | object | 是 | 下文所述的文本转语音参数 |
callback_url | string | 否 | 接收任务终态数据的 HTTPS 地址 |
Input 参数
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
text | string | 是 | — | 需要合成的文本,1–10,000 个 Unicode 字符。在词语之间插入 <#x#> 可停顿 x 秒(0.01–99.99) |
voice_id | string | 是 | — | 下方内置音色名称,或请求支持的其他非空音色标识 |
similarity | number | 否 | 1 | 目标说话人相似度,范围 0–1 |
stability | number | 否 | 0.5 | 音色稳定性,范围 0–1 |
use_speaker_boost | boolean | 否 | true | 提升英语数字、日期和单位的清晰度 |
内置音色
Playground 默认使用 Alice。可在下表试听由 AI Video API 本地托管的音色,并将名称作为 voice_id。
| voice_id | 说明 | 试听 |
|---|---|---|
Alice | Clear, engaging British woman for e-learning | |
Aria | Calm, lightly raspy middle-aged woman | |
Bill | Friendly and comforting storyteller | |
Brian | Resonant, comforting narration and advertising voice | |
Callum | Gravelly voice with an unsettling edge | |
Charlie | Confident and energetic young Australian man | |
Charlotte | Sensual, raspy character voice | |
Chris | Natural, down-to-earth all-purpose voice | |
Daniel | Strong professional broadcast and news voice | |
Eric | Smooth tenor suited to agentic use cases | |
George | Warm and captivating resonance | |
Jessica | Playful young American woman for trendy content | |
Laura | Sunny, enthusiastic young woman with a quirky attitude | |
Liam | Energetic, warm young adult for reels and shorts | |
Lily | Warm, clear British woman for news and narration | |
Matilda | Professional woman with a pleasing alto pitch | |
River | Relaxed, neutral narration and conversation voice | |
Roger | Easygoing voice for casual conversations | |
Sarah | Warm, confident and reassuring professional woman | |
Will | Conversational and laid-back voice |
创建响应
{
"code": 200,
"msg": "success",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
预估积分
以下请求只计算积分,不会创建任务:
curl -X POST https://api.aivideoapi.ai/v1/estimate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "elevenlabs/turbo-v2.5",
"input": {
"text": "你好 👋",
"voice_id": "Alice"
}
}'
查询任务
curl https://api.aivideoapi.ai/v1/tasks/{taskId} \
-H "Authorization: Bearer sk-your-api-key"
状态依次为 pending → processing → completed 或 failed。
成功
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "completed",
"model": "elevenlabs/multilingual-v2",
"created_at": 1786415700,
"completed_at": 1786415704,
"output": {
"urls": [
"https://file.aivideoapi.ai/audio/example.mp3"
],
"metadata": {
"model": "elevenlabs/multilingual-v2"
}
}
}
音频 URL 有效期为 24 小时。
失败
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "failed",
"model": "elevenlabs/multilingual-v2",
"created_at": 1786415700,
"error": {
"code": "upstream_error",
"message": "Audio generation failed"
}
}
已确认失败的任务会自动退款,并且最多退款一次。若提交状态暂时不明确,任务会保持待处理,由 AI Video API 继续核对。这两款快速 TTS 任务不支持取消,取消请求返回 HTTP 409。
回调
在创建请求中传入 callback_url。任务成功或失败后,AI Video API 会向该地址发送 POST 请求。回调数据与任务查询结果一致,失败信息也使用相同的脱敏平台级文案。若回调投递失败,请通过 GET /v1/tasks/{taskId} 查询最终状态。