API Reference
AI video translation — voice list API
GET
video-translation-voices-api
ID 32
List voices you can use in video translation preview, render, and export.
GET
https://xiaoapis.com/api/video_translation/voices
Overview
- 语音列表
- 语种筛选
Use cases
- 选择翻译配音音色
Conventions
- Gateway ·
https://xiaoapis.com - Auth · send
key(query or JSON body, as this API specifies) - Response · JSON. Check the business code and the HTTP status, not only HTTP 200
Authentication
Send the platform API key (query parameter key or JSON field key, as this page specifies). Create one in API key management.
GET https://xiaoapis.com/api/video_translation/voices
Content-Type: application/json
{
"key": "YOUR_API_KEY"
}
Request example
https://xiaoapis.com/api/video_translation/voices?language=zh-CN&key=你的密钥
Details
请求HEADER:
| 名称 | 值 |
|---|---|
| Content-Type | application/json |
请求参数说明:
| 名称 | 必填 | 类型 | 示例值 | 说明 |
|---|---|---|---|---|
| language | 是 | string | zh-CN | 目标语言代码,如:zh-CN、en-US、en。如果包含下划线,会自动提取第一部分 |
返回参数说明:
| code | int | 状态 200 成功 |
| msg | string | 响应消息 |
| data.items[n].voice | string | 音色名称/标题 |
| data.items[n].title | string | 原始字幕列表 |
| data.items[n].tags | array | 音色标签数组 |
| data.items[n].icon | string | 音色图标URL |
| data.items[n].url | string | 音色试听音频URL |
| data.items[n].gender | int | 性别(1-男声,2-女声) |
| data.items[n].language_local_code | string | 语言代码 (zh-CN) |
| data.total | int | 总数 |
| data.language | string | 目标语言代码 |
| exec_time | string | 运行时长 |
| ip | string | ip地址 |
Response example
{"code":200,"msg":"success","data":{"items":[{"voice":"cv_longanhuan","title":"温柔女声","tags":["温柔","女声"],"icon":"https://example.com/icon.png","url":"https://example.com/preview.mp3","gender":2,"language_local_code":"zh-CN"}],"total":1,"language":"zh"}}
Error codes
| 错误码 | 类型 | 说明 |
|---|---|---|
| 403 | int | 没有权限(密钥无效等) |
| 400 | int | 参数传递不正确 / 业务失败 |
| 500 | int | 服务器内部错误 |
FAQ
语音列表接口做什么?
返回可用于视频翻译配音的音色清单与预览信息。
如何筛选语种?
按文档 language 等参数筛选。
和 TTS 列表关系?
服务于视频翻译链路,字段可能独立于通用 TTS。
下一步调用谁?
通常进入预览或合成任务,并传入所选 voice。
需要 Key 吗?
需要平台 API Key。
Related APIs
- AI video translation — create preview API
- AI video translation — create render API
- AI video translation — create export API
Full console doc (with the debugger):/doc/32