logo ArityFlow公益站-TTS分站
获取 API Key
文档目录
POST

声音复刻 API(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 示例

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":"这里填写参考音频对应的文本内容"}'

参数说明

参数类型必填说明
customNamestring是音色名称,仅支持字母、数字、下划线和短横线,同一账户内唯一。该名称即调用 TTS 时的音色标识(系统内部自动映射到真实音色,对调用方透明)
modelstring是复刻使用的模型对外标识(code),如 indextts-v2;兼容旧版传入的上游模型名
audiostring是Base64 Data URL 格式的音频内容,例如 data:audio/wav;base64,...;参考音频时长必须小于 30 秒
textstring是参考音频对应的文本内容;系统自动删除全部空格

成功响应

{
  "ok": true,
  "voice": {
    "id": "voice-record-id",
    "customName": "my_voice_01",
    "model": "indextts-v2",
    "createdAt": "2026-03-08T10:00:00.000Z"
  },
  "amount": "0.500000"
}