ArityFlow公益站-TTS分站
获取 API Key
通过 API Key 上传参考音频和参考文本,为当前 API Key 所属账户创建复刻音色。
POST /api/voice-clone
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"customName": "my_voice_01",
"model": "indextts-v2",
"audio": "data:audio/wav;base64,...",
"text": "这里填写参考音频对应的文本内容"
}
curl -X POST "https://tts.arityflow.top/api/voice-clone" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"customName":"my_voice_01","model":"indextts-v2","audio":"data:audio/wav;base64,...","text":"这里填写参考音频对应的文本内容"}'
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| customName | string | 是 | 音色名称,仅支持字母、数字、下划线和短横线,同一账户内唯一。该名称即调用 TTS 时的音色标识(系统内部自动映射到真实音色,对调用方透明) |
| model | string | 是 | 复刻使用的模型对外标识(code),如 indextts-v2;兼容旧版传入的上游模型名 |
| audio | string | 是 | Base64 Data URL 格式的音频内容,例如 data:audio/wav;base64,...;参考音频时长必须小于 30 秒 |
| text | string | 是 | 参考音频对应的文本内容;系统自动删除全部空格 |
{
"ok": true,
"voice": {
"id": "voice-record-id",
"customName": "my_voice_01",
"model": "indextts-v2",
"createdAt": "2026-03-08T10:00:00.000Z"
},
"amount": "0.500000"
}