视频翻译 - Dubbing
POST
https://mapi.yunmaovideo.com/api-v1/dubbing
请求参数
Header 参数
Authorization
string
必需
示例值:
******
Body 参数application/json
url
string
音视频链接
originLang
string
源语言
示例值:
en
targetLang
string
目标语言
示例值:
zh-cn
notify
string
回调 URL
mode
enum<string>
翻译模式
枚举值:
clonebuiltIncustom
默认值:
clone
voiceId
string
目标语言的音色 Id
keepBg
boolean
是否保留背景音乐
默认值:
false
示例
{
"url": "https://test.cn/123.mp4",
"originLang": "zh-cn",
"targetLang": "en",
"notify": "https://test.cn/notify",
"mode": "clone",
"voiceId": "xiaoling",
"keepBg": true
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mapi.yunmaovideo.com/api-v1/dubbing' \
--header 'Authorization: ******' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://test.cn/123.mp4",
"originLang": "zh-cn",
"targetLang": "en",
"notify": "https://test.cn/notify",
"mode": "clone",
"voiceId": "xiaoling",
"keepBg": true
}'
返回响应
🟢200提交成功
application/json
Body
code
integer
状态码
data
object
返回数据
taskId
string
必需
msg
string
状态信息
示例
{
"code": 0,
"data": {
"taskId": "UDG3YyXDuWg3"
},
"msg": ""
}
🟢200回调-翻译成功
🟢200回调-翻译失败