# 平台能力
平台针对企业账户提供各项算法能力,包括:视频合成能力、人物形象模型生成能力、TTS个人音色模型生成能力、人物形象模型更新能力、视频人物换脸能力等。
# API 说明
用户调用平台全部API服务,皆需要访问服务接入点:aigc.softsugar.com,并在请求头中加上token信息。
# 创建接管视频合成任务
# 接口描述
根据用户上传的指定内容调用算法能力进行接管视频合成,最终返回mp4/webm格式的视频文件供用户下载。PaaS平台支持7天在线存储,需要及时转存,7天后生成内容将无法下载。
# 请求地址
POST
/api/2dvh/v1/material/video/takeover/create
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
param | String | True | 创建接管视频合成任务需要传入正确的param信息,其中包括视频合成参数(该参数为json转义后的字符串),视频合成参数定义参见视频合成任务json定义,其中人物,前景,背景只支持field id。 |
videoName | String | True | 视频名称 |
thumbnailUrl | String | False | 缩略图url |
# 请求样例
{
"videoName": "xxx",
"param": "{\"version\":\"0.0.13\",\"video_format\":\"MP4\",\"resolution\":[1080,1920],\"bit_rate\":8,\"frame_rate\":25,\"watermark\":{\"show\":true,\"content\":\"内部测试\"},\"digital_role\":{\"id\":4051,\"face_feature_id\":\"\",\"name\":\"Nina\",\"url\":\"\",\"fileId\":\"12345\",\"position\":{\"x\":0,\"y\":0},\"scale\":1.0,\"z_position\":1,\"rotation\":0.0,\"start_frame_index\":123},\"tts_config\":{\"id\":\"xiaoyue\",\"name\":\"晓月\",\"vendor_id\":3,\"language\":\"zh-CN\",\"pitch_offset\":0.0,\"speed_ratio\":1,\"volume\":100},\"tts_query\":{\"content\":\"您好,尊贵的客户\",\"ssml\":false},\"audios\":[{\"url\":\"https://dhpoc.softsugar.com/adapter/static/9b158cc9-8e42-4d09-b928-49dd9941d922.mp3\"},{\"url\":\"https://dhpoc.softsugar.com/adapter/static/9b158cc9-8e42-4d09-b928-49dd9941d922.mp3\"}],\"backgrounds\":[{\"type\":0,\"name\":\"背景\",\"url\":\"\",\"fileId\":\"12345\",\"rect\":[0,0,1080,1920],\"cycle\":false,\"start\":0,\"play_offset\":123,\"duration\":-1}],\"foregrounds\":[{\"type\":0,\"name\":\"前景\",\"url\":\"\",\"fileId\":\"12345\",\"rect\":[0,0,1080,1920],\"rotation\":0.0,\"z_position\":0,\"cycle\":false,\"play_offset\":123,\"start\":0,\"duration\":-1}],\"foreground-texts\":[{\"text\":\"前景\",\"font_size\":20,\"font_family\":\"NotoSansSChineseBlack\",\"z_position\":10,\"stroke_width\":5.0,\"stroke_rgba\":[255,0,0,0],\"opacity\":0.5,\"position\":{\"x\":0,\"y\":0},\"background_rgba\":[0,255,0,200],\"rgba\":[100,200,100,100]}],\"title\":{\"text\":\"这是标题\",\"rgba\":[100,255,255,255],\"position\":{\"x\":540,\"y\":200},\"font_size\":50,\"font_family\":\"NotoSansSChineseBlack\",\"stroke_width\":5.0,\"stroke_rgba\":[255,0,0,0],\"scale\":1.0,\"opacity\":0.5,\"background_rgba\":[0,255,0,200]},\"effects\":{\"version\":\"1.0\",\"beautify\":{\"whitenStrength\":0.30,\"whiten_mode\":0,\"reddenStrength\":0.36,\"smoothStrength\":0.74,\"smooth_mode\":0,\"shrinkRatio\":0.11,\"enlargeRatio\":0.13,\"smallRatio\":0.10,\"narrowFace\":0.0,\"roundEyesRatio\":0.0,\"thinFaceShapeRatio\":0.0,\"chinLength\":0.0,\"hairlineHeightRatio\":0.0,\"appleMusle\":0.0,\"narrowNoseRatio\":0.0,\"noseLengthRatio\":0.0,\"profileRhinoplasty\":0.0,\"mouthSize\":0.0,\"philtrumLengthRatio\":0.0,\"eyeDistanceRatio\":0.0,\"eyeAngleRatio\":0.0,\"openCanthus\":0.0,\"brightEyeStrength\":0.0,\"removeDarkCircleStrength\":0.0,\"removeNasolabialFoldsStrength\":0.0,\"whiteTeeth\":0.0,\"shrinkCheekbone\":0.0,\"thinnerHead\":0.0,\"openExternalCanthus\":0.0,\"shrinkJawbone\":0.0,\"shrinkRoundFace\":0.0,\"shrinkLongFace\":0.0,\"shrinkGoddessFace\":0.0,\"shrinkNaturalFace\":0.0,\"shrinkWholeHead\":0.0,\"contrastStrength\":0.05,\"saturationStrength\":0.10,\"sharpen\":0.0,\"clear\":0.0,\"eyeHeight\":0.0,\"mouthCorner\":0.05,\"hairline\":0.10,\"bokehStrength\":0.0}}}"
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Integer | False | 任务id |
# 响应样例
{
"code": 0,
"message": "success",
"data": 1
}
# json参数说明
同视频合成任务参数,请参考视频合成任务json参数说明
# json示例
{
"version": "0.0.13",
"video_format": "MP4",
"resolution": [1080, 1920],
"bit_rate": 8,
"frame_rate": 25,
"watermark": {
"show": true,
"content": "内部测试"
},
"digital_role": {
"id": 4051,
"face_feature_id": "",
"name": "Nina",
"url": "",
"fileId": "12345",
"position": {
"x": 0,
"y": 0
},
"scale": 1.0,
"z_position": 1,
"rotation": 0.0,
"start_frame_index":123
},
"tts_config": {
"id": "xiaoyue",
"name": "晓月",
"vendor_id": 3,
"language": "zh-CN",
"pitch_offset": 0.0,
"speed_ratio": 1,
"volume": 100
},
"tts_query": {
"content": "您好,尊贵的客户",
"ssml": false
},
"audios": [{
"url": "https://dhpoc.softsugar.com/adapter/static/9b158cc9-8e42-4d09-b928-49dd9941d922.mp3"
}, {
"url": "https://dhpoc.softsugar.com/adapter/static/9b158cc9-8e42-4d09-b928-49dd9941d922.mp3"
}],
"backgrounds": [{
"type": 0,
"name": "背景",
"url": "",
"fileId": "12345",
"rect": [0, 0, 1080, 1920],
"cycle": false,
"start": 0,
"play_offset": 123,
"duration": -1
}],
"foregrounds": [{
"type": 0,
"name": "前景",
"url": "",
"fileId": "12345",
"rect": [0, 0, 1080, 1920],
"rotation": 0.0,
"z_position": 0,
"cycle": false,
"play_offset": 123,
"start": 0,
"duration": -1
}],
"foreground-texts": [{
"text": "前景",
"font_size": 20,
"font_family": "Noto Sans S Chinese Black",
"z_position": 10,
"stroke_width": 5.0,
"stroke_rgba": [255, 0, 0, 0],
"opacity": 0.5,
"position": {
"x": 0,
"y": 0
},
"background_rgba": [0, 255, 0, 200],
"rgba": [100, 200, 100, 100]
}],
"title": {
"text": "这是标题",
"rgba": [100, 255, 255, 255],
"position": {
"x": 540,
"y": 200
},
"font_size": 50,
"font_family": "Noto Sans S Chinese Black",
"stroke_width": 5.0,
"stroke_rgba": [255, 0, 0, 0],
"scale": 1.0,
"opacity": 0.5,
"background_rgba": [0, 255, 0, 200]
},
"effects": {
"version": "1.0",
"beautify": {
"whitenStrength": 0.30,
"whiten_mode": 0,
"reddenStrength": 0.36,
"smoothStrength": 0.74,
"smooth_mode": 0,
"shrinkRatio": 0.11,
"enlargeRatio": 0.13,
"smallRatio": 0.10,
"narrowFace": 0.0,
"roundEyesRatio": 0.0,
"thinFaceShapeRatio": 0.0,
"chinLength": 0.0,
"hairlineHeightRatio": 0.0,
"appleMusle": 0.0,
"narrowNoseRatio": 0.0,
"noseLengthRatio": 0.0,
"profileRhinoplasty": 0.0,
"mouthSize": 0.0,
"philtrumLengthRatio": 0.0,
"eyeDistanceRatio": 0.0,
"eyeAngleRatio": 0.0,
"openCanthus": 0.0,
"brightEyeStrength": 0.0,
"removeDarkCircleStrength": 0.0,
"removeNasolabialFoldsStrength": 0.0,
"whiteTeeth": 0.0,
"shrinkCheekbone": 0.0,
"thinnerHead": 0.0,
"openExternalCanthus": 0.0,
"shrinkJawbone": 0.0,
"shrinkRoundFace": 0.0,
"shrinkLongFace": 0.0,
"shrinkGoddessFace": 0.0,
"shrinkNaturalFace": 0.0,
"shrinkWholeHead": 0.0,
"contrastStrength": 0.05,
"saturationStrength": 0.10,
"sharpen": 0.0,
"clear": 0.0,
"eyeHeight": 0.0,
"mouthCorner": 0.05,
"hairline": 0.10,
"bokehStrength": 0.0
}
}
}
# 创建视频人物换脸任务(内部测试)
# 接口描述
根据用户上传的视频内容和模板图片调用算法能力进行视频人物换脸处理,最终返回处理后的视频文件和缩略图供用户下载。
# 请求地址
POST
/api/2dvh/v1/material/face/swap/create
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
facePhotoUrl | String | True | 换脸使用的模板面部图片 |
videoUrl | String | True | 换脸使用的原始视频文件 |
materialName | String | True | 换脸任务名称 |
# 请求样例
{
"facePhotoUrl": "facePhotoUrl",
"videoUrl": "videoUrl",
"materialName": "materialName"
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 任务id |
# 响应样例
{
"code": 0,
"message": "success",
"data": 1
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 任务id |
# 响应样例
{
"code": 0,
"message": "success",
"data": 1
}
# 内容预热(口水话/开播脚本适用)(直播场景适用)
# 接口描述
针对口水话场景,开播脚本场景,提前进行文本请求/语音请求,得到一个id,在直播开播时直接使用,可在直播场景下提升开播/回复速度。
# 请求地址
POST
/api/2dvh/v1/material/voice/content/repository/create
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
materialName | String | True | 快速问答库名称 |
param | String | True | 快速问答库json,请参考下面的参数说明和 json 示例 |
thumbnailUrl | String | False | 缩略图Url |
# param参数说明
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
type | String | True | 需填值"quick_response"或"startup_script"。 "quick_response"表示在互动数字人场景中的口水话功能中使用。 "startup_script"表示在直播场景中的开播脚本中使用。 |
desc | String | False | 描述 |
digital_role | Object | False | 数字人 |
- face_feature_id | String | True | 数字人face feature id |
- name | String | True | 数字人名称 |
tts_config | Object | True | tts配置 |
- qid | String | False | 有text必填 |
- name | String | False | 发音人名称 |
- pitch_offset | Float | False | 音调,数值越大越尖锐,越低越低沉,支持范围 [-60, 60] |
- speed_ratio | Float | False | 语速,数值越大语速越慢,支持范围 [0.5, 2] |
- volume | Integer | False | 音量,数值越大声音越大,支持范围 [1, 400] |
voice_content | Array | True | 适用于数字人脚本和口水词的文本及音频预热。 |
- tts_query | Object | False | 预热内容的请求文本。TTS文本和音频文件只支持一个,同时存在时TTS优先。预热内容要么全部是TTS请求,要么全部是音频请求,不能混用。 |
- - content | String | False | 预热内容的文本内容 |
- - ssml | Boolean | False | 是否使用ssml请求 |
- audio | String | False | 预热内容的音频接管文件地址。TTS文本和音频文件只支持一个,同时存在时TTS优先。预热内容要么全部是TTS请求,要么全部是音频请求,不能混用。 |
# 请求样例
{
"materialName": "534",
"url": "https://xxx/materials/33/demo_20230228104258028_20230720185601860.jpg",
"param": "{\"type\":\"quick_response\",\"desc\":\"123\",\"digital_role\":{\"face_feature_id\":\"1510a3ae060e4d7ea523684eb72b3447_s1test\",\"name\":\"小李\"},\"tts_config\":{\"qid\":\"EAdUVf:AEA_Z10Mqp9GYwDGPMTSiszE7NKMqrCg\",\"name\":\"xiaoxuan\",\"pitch_offset\":0,\"speed_ratio\":1,\"volume\":400},\"voice_content\":[{\"tts_query\":{\"content\":\"感谢你的提问,这个问题我想一下回答你。\",\"ssml\":false},\"audio\":\"\"},{\"tts_query\":{\"content\":\"这是一个好问题,我需要仔细思考一下,才能给出一个准确的答案。\",\"ssml\":false},\"audio\":\"\"},{\"tts_query\":{\"content\":\"好的,这位同学,请稍等。\",\"ssml\":false}}]}"
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 任务id |
# 响应样例
{
"code": 0,
"message": "success",
"data": 1
}
# 素材预热(前景,背景,数字人资源适用)(直播场景&视频直播场景适用)
# 接口描述
用户可通过此接口提前将视频合成的素材上传到paas平台,平台做素材预热,可提升视频合成速度。
注:目前不支持取消及重新生成。
# 请求地址
POST
/api/2dvh/v1/material/file/warming
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
materialName | String | True | 素材预热任务名称 |
param | String | True | 素材预热任务json为预热内容数组,请参考下面的参数说明和 json 示例 |
# param参数说明
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
fileId | String | True | 素材文件ID |
fileUrl | String | True | 素材文件URL |
# 请求样例
{
"materialName": "XX场景预热",
"param": "[{\"fileId\":\"9b158cc9-8e42-4d09-b928-49dd9941d921\",\"fileUrl\":\"https://xxx/xxx.png\"},{\"fileId\":\"9b158cc9-8e42-4d09-b928-49dd9941d922\",\"fileUrl\":\"https://xxx/xxx.jpg\"}]"
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 任务id |
# 响应样例
{
"code": 0,
"message": "success",
"data": 134
}
# 公共素材获取
视频合成服务为您提供输入选择2D数字人形象模型,添加文本或音频合成为2D虚拟数字人mp4的视频。平台针对入驻平台的用户提供公共素材内容,助力用户快速生成内容,公共素材包括若干数字人人物形象模型,TTS个人音色模型以及视频模板。
# 素材介绍
- 数字人人物形象模型
- 视频合成阶段需要使用的2D数字人形象,平台提供若干个公共的2D数字人形象模型,供用户获取后选择。具体可联系运营开通账号后查看。
- TTS个人音色模型
- 个人音色模型包含发音人音色,以及声音的语速、音调、音量等信息,平台提供多个默认的TTS个人音色模型,供用户选择,将使用指定的音色朗读对应的文本内容,最终将此音频用于视频合成。
- 视频模板
- 视频模板即为最终合成的视频中除了人物和声音之外,人物所处的背景,人物身前展示的前景内容,视频中出现的文字位置、字体、字号等信息都统一记录在视频模板中。
# 获取全量公共人物形象模型
# 接口描述
分页返回全量公共人物形象模型列表。
# 请求地址
POST
/api/2dvh/v1/material/appearance/list
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
pageNo | Integer | False | 当前页码 (默认 1) |
pageSize | Integer | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"pageNo": 1,
"pageSize": 10
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | data object ,异常时通常为空 |
- pagination | Pagination | True | 分页信息(参照共通说明) |
- result | Array | False | 公共人物形象模型(参照下面说明) |
公共人物形象模型
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 模型id |
materialName | String | True | 素材名称 |
thumbnailUrl | String | True | 缩略图 Url |
pkgUrl | String | True | 模型素材包 url |
extendParam | String | False | 人物形象参数配置,Json格式(参照下面说明) |
desc | String | False | 备注 |
createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
extendParam中人物形象模型参数信息
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
faceFeatureId | String | True | faceFeatureId,用于短视频合成和直播等场景中的ffid字段 |
gender | Integer | False | 性别,0为未知,1为女性,2为男性 |
avatarType | Integer | False | 数字人类型,1为普通数字人,2为快速数字人,3为动静数字人,4为动作编辑数字人 |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 10,
"pageSize": 10,
"startIndex": 0
},
"result": [{
"id": 2221738,
"materialName": "公共人物形象1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"pkgUrl": "https://oss/folderPath/test_2023011312230521517.zip",
"extendParam": "{\"faceFeatureId\": \"123\"}",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
}, {
"id": 1112226,
"materialName": "公共人物形象2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"pkgUrl": "https://oss/folderPath/shenxiaoyi_2022090710331356954.zip",
"extendParam": "{\"gender\": 2, \"avatarType\": 1,\"faceFeatureId\": \"123\"}",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}]
}
}
# 获取指定公共人物形象模型
# 接口描述
根据输入参数返回指定公共人物形象模型列表。
# 请求地址
POST
/api/2dvh/v1/material/appearance
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
ids | Long[] | True | 人物形象模型id数组 |
# 请求样例
{
"ids": [13,16]
}
# 响应参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Array | False | 异常时通常为空 |
- id | Long | True | 模型id |
- materialName | String | True | 素材名称 |
- thumbnailUrl | String | True | 缩略图 Url |
- pkgUrl | String | True | 模型素材包 url |
- extendParam | String | False | 人物形象参数配置,Json格式(参照下面说明) |
- desc | String | False | 备注 |
- createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
- updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
extendParam中人物形象模型参数信息
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
faceFeatureId | String | True | Face Feature Id |
gender | Integer | False | 性别,0为未知,1为女性,2为男性 |
avatarType | Integer | False | 数字人类型,1为普通数字人,2为快速数字人,3为动静数字人,4为动作编辑数字人 |
# 响应样例
{
"code": 0,
"message": "success",
"data": [{
"id": 13,
"materialName": "公共人物形象1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"pkgUrl": "https://oss/folderPath/test_2023011312230521517.zip",
"extendParam": "{\"faceFeatureId\": \"123\"}",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
}, {
"id": 16,
"materialName": "公共人物形象2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"pkgUrl": "https://oss/folderPath/shenxiaoyi_2022090710331356954.zip",
"extendParam": "{\"gender\": 2, \"avatarType\": 1,\"faceFeatureId\": \"123\"}",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}]
}
# 获取全量公共TTS个人音色模型-Qid
# 接口描述
分页返回全量公共TTS个人音色模型-Qid列表。
# 请求地址
POST
/api/2dvh/v3/material/tts/list
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
pageNo | int | False | 当前页码 (默认 1) |
pageSize | int | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"pageNo": 1,
"pageSize": 10
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | data object ,异常时通常为空 |
- pagination | Pagination | True | 分页信息(参照共通说明) |
- result | Array | False | 公共TTS个人音色模型(参照下面说明) |
公共TTS个人音色模型
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 模型id |
extendParam | String | True | ttsConfig的Json串,记录tts参数信息(参照下面说明) |
materialName | String | True | 素材名称 |
thumbnailUrl | String | True | 缩略图 Url |
desc | String | False | 备注 |
createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
extendParam中tts参数信息
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
qid | String | True | 音色id |
voiceName | String | True | 音色名称 |
languages | Array | True | 语言 |
speedRatio | Integer | True | 语速 |
pitchOffset | Integer | True | 语调 |
volume | Integer | True | 音量 |
sampleUrl | String | False | 试听url |
gender | Integer | False | 性别,0为未知,1为女性,2为男性 |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 10,
"pageSize": 10,
"startIndex": 0
},
"result": [
{
"id": 2221738,
"extendParam": {
"qid": "ttsId1",
"languages": ["zh-CN"],
"speedRatio": 4,
"pitchOffset": 1,
"volume": 100
},
"materialName": "公共TTS个人音色模型1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
},
{
"id": 1112226,
"extendParam": {
"qid": "ttsId2",
"languages": ["zh-CN"],
"speedRatio": 4,
"pitchOffset": 1,
"gender": 1,
"volume": 100
},
"materialName": "公共TTS个人音色模型2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}
]
}
}
# 获取指定公共TTS个人音色模型-Qid
# 接口描述
根据输入参数返回指定公共TTS个人音色模型-Qid。
# 请求地址
POST
/api/2dvh/v3/material/tts
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
ids | Long[] | True | 模型id数组 |
# 请求样例
{
"ids": [13,16]
}
# 响应参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Array | False | 异常时通常为空 |
- id | Long | True | 模型id |
- extendParam | String | True | ttsConfig的Json串,记录tts参数信息(参照下面说明) |
- materialName | String | True | 素材名称 |
- thumbnailUrl | String | True | 缩略图 Url |
- desc | String | False | 备注 |
- createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
- updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
extendParam中tts参数信息
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
qid | String | True | 音色id |
voiceName | String | True | 音色名称 |
languages | Array | True | 语言 |
speedRatio | Integer | True | 语速 |
pitchOffset | Integer | True | 语调 |
volume | Integer | True | 音量 |
sampleUrl | String | False | 试听url |
gender | Integer | False | 性别,0为未知,1为女性,2为男性 |
# 响应样例
{
"code": 0,
"message": "success",
"data": [
{
"id": 13,
"extendParam": {
"qid": "ttsId1",
"languages": ["zh-CN"],
"speedRatio": 4,
"pitchOffset": 1,
"volume": 100
},
"materialName": "公共角色TTS音色模型1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
},
{
"id": 16,
"extendParam": {
"qid": "ttsId2",
"languages": ["zh-CN"],
"speedRatio": 4,
"pitchOffset": 1,
"gender": 1,
"volume": 100
},
"materialName": "公共TTS个人音色模型2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}
]
}
# 获取全量公共TTS个人音色模型(旧)
# 接口描述
分页返回全量公共TTS个人音色模型列表。
# 请求地址
POST
/api/2dvh/v1/material/tts/list
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
pageNo | int | False | 当前页码 (默认 1) |
pageSize | int | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"pageNo": 1,
"pageSize": 10
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | data object ,异常时通常为空 |
- pagination | Pagination | True | 分页信息(参照共通说明) |
- result | Array | False | 公共TTS个人音色模型(参照下面说明) |
公共TTS个人音色模型
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 模型id |
extendParam | String | True | ttsConfig的Json串,记录tts参数信息(参照下面说明) |
materialName | String | True | 素材名称 |
thumbnailUrl | String | True | 缩略图 Url |
desc | String | False | 备注 |
createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
extendParam中tts参数信息
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
vendorId | Integer | True | vendorId |
voiceId | String | True | 音色id |
voiceName | String | True | 音色名称 |
language | String | True | 语言 |
speedRatio | Integer | True | 语速 |
pitchOffset | Integer | True | 语调 |
volume | Integer | True | 音量 |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 10,
"pageSize": 10,
"startIndex": 0
},
"result": [
{
"id": 2221738,
"extendParam": {
"voiceId": "ttsId1",
"speedRatio": 4,
"pitchOffset": 1,
"volume": 100
},
"materialName": "公共TTS个人音色模型1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
},
{
"id": 1112226,
"extendParam": {
"voiceId": "ttsId2",
"speedRatio": 4,
"pitchOffset": 1,
"volume": 100
},
"materialName": "公共TTS个人音色模型2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}
]
}
}
# 获取指定公共TTS个人音色模型(旧)
# 接口描述
根据输入参数返回指定公共TTS个人音色模型。
# 请求地址
POST
/api/2dvh/v1/material/tts
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
ids | Long[] | True | 模型id数组 |
# 请求样例
{
"ids": [13,16]
}
# 响应参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Array | False | 异常时通常为空 |
- id | Long | True | 模型id |
- extendParam | String | True | ttsConfig的Json串,记录tts参数信息(参照下面说明) |
- materialName | String | True | 素材名称 |
- thumbnailUrl | String | True | 缩略图 Url |
- desc | String | False | 备注 |
- createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
- updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
extendParam中tts参数信息
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
vendorId | Integer | True | vendorId |
voiceId | String | True | 音色id |
voiceName | String | True | 音色名称 |
language | String | True | 语言 |
speedRatio | Integer | True | 语速 |
pitchOffset | Integer | True | 语调 |
volume | Integer | True | 音量 |
# 响应样例
{
"code": 0,
"message": "success",
"data": [
{
"id": 13,
"extendParam": {
"voiceId": "ttsId1",
"speedRatio": 4,
"pitchOffset": 1,
"volume": 100
},
"materialName": "公共角色TTS音色模型1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
},
{
"id": 16,
"extendParam": {
"voiceId": "ttsId2",
"speedRatio": 4,
"pitchOffset": 1,
"volume": 100
},
"materialName": "公共TTS个人音色模型2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}
]
}
# 获取全量公共视频模板
# 接口描述
分页返回全量公共视频模板列表。
# 请求地址
POST
/api/2dvh/v1/material/video/template/list
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
pageNo | Integer | False | 当前页码 (默认 1) |
pageSize | Integer | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"pageNo": 1,
"pageSize": 10
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | data object ,异常时通常为空 |
- pagination | Pagination | True | 分页信息(参照共通说明) |
- result | Array | False | 公共视频模板(参照下面说明) |
公共视频模板
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 模板id |
materialName | String | True | 模板名称 |
thumbnailUrl | String | True | 缩略图 Url |
pkgUrl | String | True | 模板 url |
extendUrl | String | True | 示例视频 url |
desc | String | False | 备注 |
createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 10,
"pageSize": 10,
"startIndex": 0
},
"result": [{
"id": 2221738,
"materialName": "公共视频模板1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"pkgUrl": "https://oss/folderPath/demo_20230608150104747.json",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
}, {
"id": 1112226,
"materialName": "公共视频模板2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"pkgUrl": "https://oss/folderPath/shenxiaoyi_2022090710331356954.json",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}]
}
}
# 获取指定公共视频模板
# 接口描述
根据输入参数返回指定公共视频模板。
# 请求地址
POST
/api/2dvh/v1/material/video/template
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
ids | Long[] | True | 视频模板id数组 |
# 请求样例
{
"ids": [13,16]
}
# 响应参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Array | False | 异常时通常为空 |
- id | Long | True | 模板id |
- materialName | String | True | 模板名称 |
- thumbnailUrl | String | True | 缩略图 Url |
- pkgUrl | String | True | 模板 url |
- extendUrl | String | True | 示例视频 url |
- desc | String | False | 备注 |
- createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
- updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
# 响应样例
{
"code": 0,
"message": "success",
"data": [{
"id": 13,
"materialName": "公共视频模板1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"pkgUrl": "https://oss/folderPath/test_2023011312230521517.json",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
}, {
"id": 16,
"materialName": "公共视频模板2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"pkgUrl": "https://oss/folderPath/shenxiaoyi_2022090710331356954.json",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}]
}
# 获取全量公共直播脚本
# 接口描述
分页返回全量公共直播脚本列表。
# 请求地址
POST
/api/2dvh/v1/material/live/script/list
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
pageNo | Integer | False | 当前页码 (默认 1) |
pageSize | Integer | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"pageNo": 1,
"pageSize": 10
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | data object ,异常时通常为空 |
- pagination | Pagination | True | 分页信息(参照共通说明) |
- result | Array | False | 公共直播脚本(参照下面说明) |
公共视频模板
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 模板id |
materialName | String | True | 脚本名称 |
thumbnailUrl | String | True | 缩略图 Url |
pkgUrl | String | True | 脚本素材 url |
extendUrl | String | True | 暂无内容 |
desc | String | False | 备注 |
createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 10,
"pageSize": 10,
"startIndex": 0
},
"result": [{
"id": 2221738,
"materialName": "公共直播脚本1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"pkgUrl": "https://oss/folderPath/test_2023011312230521517.json",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
}, {
"id": 1112226,
"materialName": "公共直播脚本2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"pkgUrl": "https://oss/folderPath/shenxiaoyi_2022090710331356954.json",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}]
}
}
# 获取指定公共直播脚本
# 接口描述
根据输入参数返回指定公共直播脚本。
# 请求地址
POST
/api/2dvh/v1/material/live/script
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
ids | Long[] | True | 直播脚本id数组 |
# 请求样例
{
"ids": [13,16]
}
# 响应参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Array | False | 异常时通常为空 |
- id | Long | True | 脚本id |
- materialName | String | True | 直播脚本名称 |
- thumbnailUrl | String | True | 缩略图 Url |
- pkgUrl | String | True | 脚本素材包 url |
- extendUrl | String | True | 暂无 |
- desc | String | False | 备注 |
- createTime | String | True | 创建时间,yyyy-MM-dd HH:mm:ss |
- updateTime | String | True | 最后更新时间,yyyy-MM-dd HH:mm:ss |
# 响应样例
{
"code": 0,
"message": "success",
"data": [{
"id": 13,
"materialName": "公共直播脚本1",
"thumbnailUrl": "https://oss/folderPath/202208051916341307.png",
"pkgUrl": "https://oss/folderPath/test_2023011312230521517.json",
"desc": null,
"createTime": "2023-01-13 12:31:13",
"updateTime": "2023-01-13 12:31:13"
}, {
"id": 16,
"materialName": "公共直播脚本2",
"thumbnailUrl": "https://oss/folderPath/2022102468165914964.png",
"pkgUrl": "https://oss/folderPath/shenxiaoyi_2022090710331356954.json",
"desc": null,
"createTime": "2022-09-06 19:10:09",
"updateTime": "2022-10-28 16:59:18"
}]
}
# 获取指定任务信息
# 接口描述
根据用户传入的任务ID查询任务的对应信息,以及当前的任务所处状态。
# 请求地址
POST
/api/2dvh/v1/task/info
# 请求头
Content-Type:
application/json
# 请求参数
JSON数组格式,数组中对象的字段定义如下:
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
ids | Long[] | True | 任务id列表 |
# 请求样例
{
"ids": [7,27]
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 任务信息 |
- id | Long | True | 任务id |
- materialId | Integer | True | 素材 id |
- materialName | String | True | 素材名称 |
- algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,20:视频人物换脸,18:人物形象模型更新,25:音色转换, 32:图片绿幕分割预览,33:视频绿幕分割预览,41:TTS V3音色模型生成 ,42:口水话(快速答复库),43:文件预热 ) |
- algoSubType1 | String | True | 人物模型:模型规格:2K/4K,视频合成:使用人物模型规格:2K/4K |
- algoSubType2 | String | False | 视频合成:结果物格式:webm/mp4 |
- algoSubType3 | String | False | 视频合成:结果物帧率 |
- status | Integer | True | 任务状态,0:未开始,1:Dispatcher队列等待中,2:算法正在处理,3:已取消,5:已完成,9:异常 |
- extendParam | String | False | 扩展参数 |
- productParam | String | True | 任务结果json串,不同任务格式不同。 |
- startTime | String | True | 算法开始时间(yyyy-MM-dd HH:mm:ss) |
- endTime | String | True | 算法截止时间(yyyy-MM-dd HH:mm:ss) |
# case1: 视频合成
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
duration | Integer | True | 合成视频时长(单位:毫秒) |
lastFrameIndex | Integer | True | 视频结尾帧 |
algoSubType1 | String | True | 视频合成:使用人物模型规格:2K/4K |
algoSubType2 | String | True | 视频合成:结果物格式:webm/mp4 |
algoSubType3 | String | True | 视频合成:结果物帧率 |
thumbPath | String | True | 缩略图下载地址(7天有效) |
videoPath | String | True | 视频下载地址(7天有效) |
# case1 返回样例:
{
"code": 0,
"message": "success",
"data": [
{
"id": 913318,
"materialId": 854513,
"materialName": "913288",
"productParam": "{\"duration\": 880, \"thumbPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxxx/thumb.png\", \"videoPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxxx/video.mp4\"}",
"extendParam": null,
"startTime": "2024-05-27 16:38:54",
"endTime": "2024-05-27 16:39:03",
"status": 5,
"message": "{\"time_info\": {\"parse_json\": {\"avg\": 15, \"end\": \"2024-05-27 16:38:52.913\", \"sum\": 15, \"start\": \"2024-05-27 16:38:52.897\"}, \"preprocess\": {\"avg\": 342, \"end\": \"2024-05-27 16:38:56.134\", \"sum\": 342, \"start\": \"2024-05-27 16:38:55.792\"}, \"postprocess\": {\"avg\": 380, \"end\": \"2024-05-27 16:39:02.351\", \"sum\": 380, \"start\": \"2024-05-27 16:39:01.971\"}, \"main_process\": {\"avg\": 5837, \"end\": \"2024-05-27 16:39:01.971\", \"sum\": 5837, \"start\": \"2024-05-27 16:38:56.134\"}, \"audio_process\": {\"avg\": 123.91666412353516, \"sum\": 2974}, \"video_process\": {\"avg\": 9.47826099395752, \"sum\": 218}, \"wait_srt_stream\": {\"avg\": 0, \"sum\": 0}, \"send_task_response\": {\"start\": \"2024-05-27 16:39:02.775\"}, \"receive_task_from_agent\": {\"start\": \"2024-05-27 16:38:52.897\"}, \"st_mobile_change_package\": {\"avg\": 1832, \"end\": \"2024-05-27 16:38:54.745\", \"sum\": 1832, \"start\": \"2024-05-27 16:38:52.913\"}}, \"video_info\": {\"fps\": 25, \"format\": \"mp4\", \"digital_type\": \"2K\", \"last_frame_index\": 22}}",
"algoType": 14,
"algoId": "8216eaea6xxxxxx2e0798d21",
"algoSubType1": "2K",
"algoSubType2": "mp4",
"algoSubType3": "25",
"isDelete": 0
}
]
}
# case2: 人物形象模型生成
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
thumbPath | String | True | 基础视频生成人物模型缩略图下载地址(7天有效) |
multi | Array | True | 模型结果 |
- width | String | True | 宽度 |
- width | String | True | 高度 |
- pkgPath | String | True | 人物形象下载地址 (7天有效),多视频人物模型生成时无此字段返回 |
- thumbPath | String | True | 视频生成人物模型缩略图下载地址(7天有效) |
- faceFeatureId | String | True | ff id |
- userJson | String | True | 训练参数 |
- avatarResultJson | String | True | 训练结果 |
# case2 返回样例:
{
"code": 0,
"message": "success",
"data": [
{
"id": 908438,
"materialId": 850297,
"materialName": "蘇xxx",
"productParam": "{\"multi\": [{\"common\": {\"pkgPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.x.com/x/116/xxxx/input_source/2/xx.zip\", \"userJson\": \"https://dwg-aigc-paas.oss-cnxxxx/input_source/2/xxx.json\", \"thumbPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxx/input_source/2/xxx.png\", \"faceFeatureId\": \"xxxxx\"}, \"origin\": {\"pkgPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/2bd5e869e94d4995967428fa7ad7cf49_s1/input_source/0/xxx.zip\", \"userJson\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxx/input_source/0/xxx.json\", \"thumbPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxx/input_source/0/xxx.png\", \"faceFeatureId\": \"2bd5e869e94dxxxxxa7ad7cf49_s1_0\"}, \"videoUrl\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/xxxxB.mp4\"}], \"thumbPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxx/input_source/0/xxx.png\"}",
"extendParam": null,
"startTime": "2024-05-22 18:14:21",
"endTime": "2024-05-22 21:57:19",
"status": 5,
"message": "{}",
"algoType": 12,
"algoId": "2bd5exxxxxa7ad7cf49_s1",
"algoSubType1": "4K",
"algoSubType2": "multi",
"algoSubType3": "normal",
"isDelete": 0
}
]
}
# case3: (多视频)人物形象模型生成(/model/multi/create接口结果)
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
thumbPath | String | True | 基础视频生成人物模型缩略图下载地址(7天有效) |
multi | Array | False | 多视频人物模型生结果,内容为数组 |
- videoUrl | String | True | 原始视频文件URL |
- orgin | Object | True | 原始口型人物模型对象 (stage1Template参数为0) |
- - thumbPath | String | True | 人物模型缩略图下载地址(7天有效) |
- - pkgPath | String | True | 人物模型下载地址 (7天有效) |
- - faceFeatureId | String | True | Face Feature Id |
- - userJson | String | True | User Json 信息 |
- - avatarResultJson | String | True | Avatar Result Json 信息 |
- common | Object | True | 通用口型人物模型对象 (stage1Template参数为1 ) |
- - thumbPath | String | True | 人物模型缩略图下载地址(7天有效) |
- - pkgPath | String | True | 人物模型下载地址 (7天有效) |
- - faceFeatureId | String | True | Face Feature Id |
- - userJson | String | True | User Json 信息 |
- - avatarResultJson | String | True | Avatar Result Json 信息 |
# case3 productParam 返回样例:
{
"multi": [{
"common": {
"pkgPath": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/xxx47_s1_input_source_2_result.zip",
"userJson": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/ss_user.json",
"thumbPath": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/xxlt.png",
"faceFeatureId": "8c19c600a75addd9e666eca06413f47_s1_1",
"avatarResultJson": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/xxlt.Json"
},
"origin": {
"pkgPath": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/aa_0_result.zip",
"userJson": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/bbuser.json",
"thumbPath": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/xx0_result.png",
"faceFeatureId": "8c19c600a75a4f323e666eca06413f47_s1_0",
"avatarResultJson": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/xxlt.Json"
},
"videoUrl": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/xx.mp4"
}],
"thumbPath": "https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/xx.png"
}
# case4: 人物形象模型更新
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
thumbPath | String | True | 人物模型缩略图下载地址(7天有效) |
pkgPath | String | True | 人物模型下载地址 (7天有效) |
modelInfo | String | True | 人物模型:模型规格:2K/4K |
# case4 返回样例:
{
"code": 0,
"message": "success",
"data": [
{
"id": 890212,
"materialId": 833961,
"materialName": "KURUMI",
"productParam": "{\"pkgPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxxx/xxx.zip\", \"userJson\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxxx/xxxx.json\", \"modelInfo\": \"2K\", \"thumbPath\": \"https://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/download/116/xxx/xxxx.png\"}",
"extendParam": null,
"startTime": "2024-05-10 10:51:35",
"endTime": "2024-05-10 11:50:24",
"status": 5,
"message": "{}",
"algoType": 18,
"algoId": "cut_bf9c19046exxxxxb9af791587_s1",
"algoSubType1": "2K",
"algoSubType2": null,
"algoSubType3": "normal",
"isDelete": 0
}
]
}
# case5: TTS音色模型生成(旧)(不建议使用)
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
taskId | String | True | 对应任务的ID |
voice | Object | True | 声音信息 |
- id | String | True | 声音ID |
- name | String | True | 发音人名称 |
- gender | Integer | True | 发音人性别。0 = Not known。1 = Male。2 = Female。9 = Not applicable |
- language | String | True | 发音人语言。zh-CN中文普通话,en-US美式英文 |
- vendor_id | Integer | True | 声音供应商ID |
taskStatus | Integer | True | 任务状态。1 = 排队中。2 = 任务进行中。3 = 已取消。5 = 已完成。 9 = 异常。 |
msg | String | True | 任务状态描述信息。 |
stage | String | True | 任务子步骤。preprocess:数据预处理。label:数据标注。training:模型训练。deployment:部署阶段。 |
stageStatus | Integer | True | 阶段状态。1 = 排队中。2 = 任务进行中。5 = 已完成。 9 = 异常。 |
sampleAudioUrl | String | False | 示例音频的地址 (7天有效) |
tenant | String | True | 任务所属租户 |
updatedTime | String | True | 任务信息更新时间RFC3339格式。 |
modelUrl | String | False | 任务成功时返回模型下载地址,仅内网可用。暂不对外提供 |
# case6: 视频人物换脸
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
thumbPath | String | True | 缩略图下载地址 (7天有效) |
pkgPath | String | True | 人物形象下载地址 (7天有效) |
# case7: TTS -Qid音色模型生成
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
taskId | String | True | 对应任务的ID |
voice | Object | True | 声音信息 |
- qid | String | True | 声音QID |
- name | String | True | 发音人名称 |
- gender | Integer | True | 发音人性别。0 = Not known。1 = Male。2 = Female。9 = Not applicable |
- languages | String | True | 发音人支持的语言列表。zh-CN中文普通话,en-US美式英文,仅当任务完成时返回 |
taskType | String | True | 声音训练算法类型 |
taskStatus | Integer | True | 任务状态。1 = 排队中。2 = 任务进行中。3 = 已取消。5 = 已完成。 9 = 异常。 |
msg | String | True | 任务状态描述信息。 |
stage | String | True | 任务子步骤。preprocess:数据预处理。label:数据标注。training:模型训练。deployment:部署阶段。 |
stageStatus | Integer | True | 阶段状态。1 = 排队中。2 = 任务进行中。5 = 已完成。 9 = 异常。 |
sampleAudioUrl | String | False | 示例音频的地址 (7天有效) |
tenant | String | True | 任务所属租户 |
updatedTime | String | True | 任务信息更新时间RFC3339格式。 |
extendParam中人物形象模型参数信息
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
faceFeatureId | String | True | Face Feature Id |
# case7 返回样例:
{
"code": 0,
"message": "success",
"data": [
{
"id": 206216,
"materialId": 1990411,
"materialName": "TTS_yunynsent",
"productParam": "{\"msg\":\"task is finished\",\"stage\":\"deployment\",\"voice\":{\"qid\":\"VQ1fQv:AEAygt1ixxxxxxdRPNLE11kg1TLXWSzMxNExLTksK\",\"name\":\"TTS6_yunyxxxxxen_consent\",\"gender\":1,\"languages\":[\"en-US\",\"zh-CN\",\"af-ZA\",\"am-ET\",\"ar-EG\",\"ar-SA\",\"az-AZ\",\"bg-BG\",\"bn-BD\",\"bn-IN\",\"bs-BA\",\"ca-ES\",\"cs-CZ\",\"cy-GB\",\"da-DK\",\"de-AT\",\"de-CH\",\"de-DE\",\"el-GR\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-IE\",\"en-IN\",\"es-ES\",\"es-MX\",\"et-EE\",\"eu-ES\",\"fa-IR\",\"fi-FI\",\"fil-PH\",\"fr-BE\",\"fr-CA\",\"fr-CH\",\"fr-FR\",\"ga-IE\",\"gl-ES\",\"he-IL\",\"hi-IN\",\"hr-HR\",\"hu-HU\",\"hy-AM\",\"id-ID\",\"is-IS\",\"it-IT\",\"ja-JP\",\"jv-ID\",\"ka-GE\",\"kk-KZ\",\"km-KH\",\"kn-IN\",\"ko-KR\",\"lo-LA\",\"lt-LT\",\"lv-LV\",\"mk-MK\",\"ml-IN\",\"mn-MN\",\"ms-MY\",\"mt-MT\",\"my-MM\",\"nb-NO\",\"ne-NP\",\"nl-BE\",\"nl-NL\",\"pl-PL\",\"ps-AF\",\"pt-BR\",\"pt-PT\",\"ro-RO\",\"ru-RU\",\"si-LK\",\"sk-SK\",\"sl-SI\",\"so-SO\",\"sq-AL\",\"sr-RS\",\"su-ID\",\"sv-SE\",\"sw-KE\",\"ta-IN\",\"te-IN\",\"th-TH\",\"tr-TR\",\"uk-UA\",\"ur-PK\",\"uz-UZ\",\"vi-VN\",\"zh-HK\",\"zh-TW\",\"zu-ZA\"]},\"taskId\":\"tts6-xxx-xxxx-xxx-xx-789308\",\"tenant\":\"0\",\"taskType\":\"TTS6\",\"taskStatus\":5,\"stageStatus\":5,\"updatedTime\":\"2024-05-29T09:41:51.373802578Z\",\"sampleAudioUrl\":\"\"}",
"extendParam": null,
"startTime": "2024-05-29 17:38:31",
"endTime": "2024-05-29 17:41:51",
"status": 5,
"message": "{\"tts resp msg\": \"task is finished\"}",
"algoType": 41,
"algoId": "f627-a980-78aba9c20308",
"algoSubType1": null,
"algoSubType2": null,
"algoSubType3": null,
"isDelete": 0
}
]
}
# case8: 文件预热(失败信息,预热成功文件不展示)
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
fileWarmingDetails | Array | False | 失败文件信息 |
- fileId | String | True | 文件ID |
- warmingResult | String | True | 文件预热失败原因 |
# case8 返回样例:
{
"code": 0,
"message": "success",
"data": {
"fileWarmingDetails": [
{
"fileId": "f627-a980-78aba9c20308",
"warmingResult": "download error"
},
{
"fileId": "xde37-a980-78aba9c20308",
"warmingResult": "download error"
}
]
}
}
# 获取账户任务信息
# 接口描述
根据用户的账户ID查询其账户下某算法类型下全部任务的对应信息,以及当前的任务所处状态,任务列表支持分页。
# 请求地址
POST
/api/2dvh/v1/task/listByAccount
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,20:视频人物换脸,18:人物形象模型更新,25:音色转换, 32:图片绿幕分割预览,33:视频绿幕分割预览,41:TTS V3音色模型生成,42:口水话(快速答复库),43:文件预热 ) |
pageNo | int | False | 当前页码 (默认 1) |
pageSize | int | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"algoType": 12,
"pageSize": 10,
"pageNo": 1
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他- 异常 |
message | String | True | 异常详细信息 |
data | Object | False | data object ,异常时通常为空 |
- pagination | Pagination | True | 分页信息(参照通用数据结构说明) |
- result | Object | True | 任务列表(参照下面说明) |
任务列表
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 任务id |
algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,20: 视频人物换脸,18:人物形象模型更新,25:音色转换, 32:图片绿幕分割预览,33:视频绿幕分割预览,41:TTS V3音色模型生成,42:口水话(快速答复库),43:文件预热 ) |
algoSubType1 | String | True | 人物模型:模型规格:2K/4K,视频合成:使用人物模型规格:2K/4K |
algoSubType2 | String | False | 视频合成:结果物格式:webm/mp4 |
algoSubType3 | String | False | 视频合成:结果物帧率 |
status | Integer | True | 任务状态 0:未开始,1:Dispatcher队列等待中,2:算法正在处理,3:已取消,5:已完成,9:异常 |
productParam | String | True | 任务结果json串,包含视频地址videoPath,视频时长duration,截图地址thumbPath |
startTime | String | True | 算法开始时间(yyyy-MM-dd HH:mm:ss) |
endTime | String | True | 算法截止时间(yyyy-MM-dd HH:mm:ss) |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 2,
"pageSize": 2,
"startIndex": 0
},
"result": [
{
"id": 27,
"algoType": 12,
"algoSubType1": "4K",
"algoSubType2": null,
"algoSubType3": null,
"productParam": "\"{\\\"duration\\\":1234,\\\"thumbPath\\\":\\\"https://oss-cn-hangzhou.aliyuncs.com/dwg-aigc-paas/materials/a8610d001aaa412ab2e0433fc848b48f/thumb.jpg\\\",\\\"videoPath\\\":\\\"https://oss-cn-hangzhou.aliyuncs.com/dwg-aigc-paas/materials/a8610d001aaa412ab2e0433fc848b48f/output.mp4\\\"}\"",
"startTime": "2023-02-17 16:53:26",
"endTime": "2023-02-18 10:03:21",
"status": 5
},
{
"id": 7,
"algoType": 12,
"algoSubType1": "4K",
"algoSubType2": null,
"algoSubType3": null,
"productParam": "{}",
"startTime": "2023-02-17 16:56:26",
"endTime": "2023-02-17 17:43:19",
"status": 9
}
]
}
}
# 获取账户任务信息详情
# 接口描述
查询账户下某算法类型下全部任务的对应信息,以及当前的任务所处状态,原始输入内容,返回结果物等信息详情,任务列表支持分页。
# 请求地址
POST
/api/2dvh/v1/task/listWithQueue
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
userId | Long | False | 用户id,默认为当前登录账户id |
algoType | Integer | True | 任务类型(11:TTS音色模型生成(旧),12:人物形象模型生成,14:视频合成,20: 视频人物换脸,18:人物形象模型更新,25:音色转换, 32:图片绿幕分割预览,33:视频绿幕分割预览,41:TTS Qid音色模型生成 ) |
status | Integer | True | 任务状态 (0:未开始,1:Dispatcher队列等待中,2:算法正在处理,3:已取消,5:已完成,9:异常, -1: 全部 ) |
key | String | False | 任务ID/角色名称查询(精确匹配) |
pageNo | int | False | 当前页码 (默认 1) |
pageSize | int | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"algoType": 12,
"pageSize": 10,
"pageNo": 1
}
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Number | True | 0 - 成功, 其他- 异常 |
message | String | True | 异常详细信息 |
data | Object | False | data object ,异常时通常为空 |
- pagination | Pagination | True | 分页信息(参照通用数据结构说明) |
- result | Object | True | 任务列表(参照下面说明) |
任务列表
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 任务id |
algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,20: 视频人物换脸,18:人物形象模型更新,25:音色转换, 32:图片绿幕分割预览,33:视频绿幕分割预览,41:TTS V3音色模型生成,42:口水话(快速答复库),43:文件预热 |
materialId | Long | True | 模型id |
materialName | String | True | 素材名称 |
queueInfo | String | False | 排队信息 |
status | Integer | True | 任务状态 0:未开始,1:Dispatcher队列等待中,2:算法正在处理,3:已取消,5:已完成,9:异常 |
productParam | String | True | 任务结果json串,包含视频地址videoPath,视频时长duration,截图地址thumbPath |
extendParam | String | False | 扩展参数,人物形象模型生成时包含faceFeatureId |
algoSubType1 | String | True | 人物模型:模型规格:2K/4K,视频合成: 使用人物模型规格:2K/4K |
algoSubType2 | String | False | 视频合成:结果物格式:webm/mp4 |
algoSubType3 | String | False | 视频合成:结果物帧率 |
taskInfo | String | True | 任务初始参数及原始文件 |
algoId | String | True | 算法任务id |
message | String | False | 错误信息 |
submitTime | String | True | 算法提交时间(yyyy-MM-dd HH:mm:ss) |
startTime | String | False | 算法开始时间(yyyy-MM-dd HH:mm:ss) |
endTime | String | False | 算法截止时间(yyyy-MM-dd HH:mm:ss) |
owner | Long | True | 任务所属账户 |
ownerPhone | String | True | 账户手机号码 |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 2,
"pageSize": 2,
"startIndex": 0
},
"result": [
{
"id": 8833,
"materialId": 8122,
"materialName": "Mario_4_talk.mp4_sensetime-segment_type_绿幕分割",
"productParam": "{\"pkgPath\": \"https://dwg-aigc-paas-test.oss-cn-hangzhou.aliyuncs.com/download/8/b6ecebc8233b47809dedd6731c052d15_s1/b6ecebc8233b47809dedd6731c052d15_s1_result.zip\", \"thumbPath\": \"https://dwg-aigc-paas-test.oss-cn-hangzhou.aliyuncs.com/download/8/b6ecebc8233b47809dedd6731c052d15_s1/b6ecebc8233b47809dedd6731c052d15_s1_result.png\", \"faceFeaturePath\": \"https://dwg-aigc-paas-test.oss-cn-hangzhou.aliyuncs.com/download/8/b6ecebc8233b47809dedd6731c052d15_s1/b6ecebc8233b47809dedd6731c052d15_s1_face_feature.zip\"}",
"extendParam": "{\"faceFeatureId\": \"b6ecebc8233b47809dedd6731c052d15_s1\"}",
"startTime": "2023-06-07 23:31:50",
"endTime": "2023-06-08 05:19:29",
"status": 5,
"message": "{}",
"algoType": 12,
"algoId": "b6ecebc8233b47809dedd6731c052d15_s1",
"algoSubType1": "4K",
"algoSubType2": null,
"algoSubType3": null,
"submitTime": "2023-06-07 17:34:40",
"ownerPhone": "18311096857",
"owner": 8,
"queueInfo": null,
"taskInfo": "{\"create2DAvatarModel\": {\"videoUrl\": \"https://ailab-storage-eus.oss-us-west-1.aliyuncs.com/31_trim_result/Mario_4_talk.mp4?OSSAccessKeyId=LTAI5tE2Hq2BAqr8EBzxmSrR&Expires=37686060051&Signature=C1L%2FxpHD%2FW155s%2BuhTocyVvsUfo%3D\", \"accountId\": 8, \"assetScale\": 1.0, \"existTaskId\": 0, \"firstCreate\": true, \"materialName\": \"Mario_4_talk.mp4_sensetime-segment_type_绿幕分割\", \"segmentStyle\": 1}}"
},
{
"id": 9093,
"materialId": 8258,
"materialName": "wu0609_sensetime-segment_type_绿幕分割",
"productParam": null,
"extendParam": null,
"startTime": "2023-06-09 10:56:38",
"endTime": null,
"status": 2,
"message": "{}",
"algoType": 12,
"algoId": "5f6006acb891496f93bfeeff601201fe_s1",
"algoSubType1": "4K",
"algoSubType2": null,
"algoSubType3": null,
"submitTime": "2023-06-09 10:56:36",
"ownerPhone": "18311096857",
"owner": 8,
"queueInfo": null,
"taskInfo": "{\"create2DAvatarModel\": {\"videoUrl\": \"http://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/wanxing_0606/zhuzong.mp4\", \"accountId\": 8, \"assetScale\": 1.0, \"existTaskId\": 0, \"firstCreate\": true, \"materialName\": \"wu0609_sensetime-segment_type_绿幕分割\", \"segmentStyle\": 1}}"
},
{
"id": 8528,
"materialId": 7908,
"materialName": "Claire_3_talk.mp4_sensetime-segment_type_绿幕分割",
"productParam": "{\"pkgPath\": \"https://dwg-aigc-paas-test.oss-cn-hangzhou.aliyuncs.com/download/8/1907b913f78845168529bad59f36a43f_s1/1907b913f78845168529bad59f36a43f_s1_result.zip\", \"thumbPath\": \"https://dwg-aigc-paas-test.oss-cn-hangzhou.aliyuncs.com/download/8/1907b913f78845168529bad59f36a43f_s1/1907b913f78845168529bad59f36a43f_s1_result.png\", \"faceFeaturePath\": \"https://dwg-aigc-paas-test.oss-cn-hangzhou.aliyuncs.com/download/8/1907b913f78845168529bad59f36a43f_s1/1907b913f78845168529bad59f36a43f_s1_face_feature.zip\"}",
"extendParam": "{\"faceFeatureId\": \"1907b913f78845168529bad59f36a43f_s1\"}",
"startTime": "2023-06-06 02:32:13",
"endTime": "2023-06-06 20:17:19",
"status": 9,
"message": "{\"errorMsg\": \"Algorithm heart beat is overtime!!!\"}",
"algoType": 12,
"algoId": "1907b913f78845168529bad59f36a43f_s1",
"algoSubType1": "4K",
"algoSubType2": null,
"algoSubType3": null,
"submitTime": "2023-06-05 20:41:43",
"ownerPhone": "18311096857",
"owner": 8,
"queueInfo": null,
"taskInfo": "{\"create2DAvatarModel\": {\"videoUrl\": \"https://ailab-storage-eus.oss-us-west-1.aliyuncs.com/online_videos/Claire_3_talk.mp4?OSSAccessKeyId=LTAI5tE2Hq2BAqr8EBzxmSrR&Expires=1689391554&Signature=pMSBmAlawZ7h2sxjUO8Dk%2B1dHRg%3D\", \"accountId\": 8, \"assetScale\": 1.0, \"existTaskId\": 0, \"firstCreate\": true, \"materialName\": \"Claire_3_talk.mp4_sensetime-segment_type_绿幕分割\", \"segmentStyle\": 2}}"
},
{
"id": 9161,
"materialId": 8317,
"materialName": "Eddie_3_talk_trim_sensetime_0_绿幕分割",
"productParam": null,
"extendParam": null,
"startTime": null,
"endTime": null,
"status": 1,
"message": "{}",
"algoType": 18,
"algoId": "1667070933254279169",
"algoSubType1": "4K",
"algoSubType2": null,
"algoSubType3": null,
"submitTime": "2023-06-09 15:28:48",
"ownerPhone": "18311096857",
"owner": 8,
"queueInfo": "8/9",
"taskInfo": "{\"rebuild2DAvatarModelVideo\": {\"assetEnd\": 120.0, \"modelUrl\": \"https://dwg-aigc-paas-test.oss-cn-hangzhou.aliyuncs.com/download/8/ba80636d8a77423083af66174375a130_s1/ba80636d8a77423083af66174375a130_s1_result.zip\", \"videoUrl\": \"http://dwg-aigc-paas.oss-cn-hangzhou.aliyuncs.com/wanxing_0606/Eddie_3_talk_trim.mp4.mp4\", \"accountId\": 8, \"assetScale\": 1.0, \"assetStart\": 60.0, \"existTaskId\": 0, \"firstCreate\": true, \"materialName\": \"Eddie_3_talk_trim_sensetime_0_绿幕分割\", \"segmentStyle\": 1}}"
}
]
}
}
# 取消任务
# 接口描述
支持用户对于进行中的任务进行取消任务的操作,取消成功后任务状态将置为已取消。
# 请求地址
GET
/api/2dvh/v1/task/cancel
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 任务id |
# 请求样例
http://xxx/api/2dvh/v1/task/cancel?id=1
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 值为空 |
# 响应样例
{
"code": 0,
"message": "success",
"data": null
}
# 删除任务
# 接口描述
支持用户对于非进行中的任务进行删除任务的操作,删除后任务信息将不再保存。
# 请求地址
DELETE
/api/2dvh/v1/task/del
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 任务id |
# 请求样例
http://xxx/api/2dvh/v1/task/del/id
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 值为空 |
# 响应样例
{
"code": 0,
"message": "success",
"data": null
}
# 重启任务
# 接口描述
支持用户对于异常的的任务进行重启任务的操作,重启后任务ID保持不变。
# 请求地址
GET
/api/2dvh/v1/task/restart
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | task id |
# 请求样例
http://xxx/api/2dvh/v1/task/restart?id=1
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | False | 任务id |
# 响应样例
{
"code": 0,
"message": "success",
"data": 2
}
# 查询任务各阶段耗时信息
# 接口描述
查询任务各阶段耗时信息,当前仅支持视频合成。
# 请求地址
GET
/api/2dvh/v1/task/phase/cost
# 请求头
Content-Type:
application/json
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 任务id |
# 请求样例
https://xxx/api/2dvh/v1/task/phase/cost?id=1
# 响应元素
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Array | False | 值为空 |
- phase | String | True | 算法阶段:asset_download:素材下载 parse_json:json解析时间 st_mobile_change_package:加载数字人资源 preprocess:前处理时间,准备各类资源 main_process:音视频处理 postprocess:ffmpeg视频后处理 result_upload:结果上传 |
- startTime | String | True | 阶段开始时间(yyyy-MM-dd HH:mm:ss) |
- endTime | String | True | 阶段完成时间(yyyy-MM-dd HH:mm:ss) |
- costTime | String | True | 耗时(毫秒) |
- callCount | Integer | False | 阶段重复次数,该值为空表示阶段无重复 |
# 响应样例
{
"code": 0,
"message": "success",
"data": [
{
"id": 291340,
"phase": "asset_download",
"startTime": "2023-11-01 16:41:17",
"endTime": "2023-11-01 16:41:17",
"costTime": 0
},
{
"id": 291340,
"phase": "parse_json",
"startTime": "2023-11-01 16:41:17",
"endTime": "2023-11-01 16:41:18",
"costTime": 124
},
{
"id": 291340,
"phase": "st_mobile_change_package",
"startTime": "2023-11-01 16:41:18",
"endTime": "2023-11-01 16:41:20",
"costTime": 2242
},
{
"id": 291340,
"phase": "preprocess",
"startTime": "2023-11-01 16:41:20",
"endTime": "2023-11-01 16:41:21",
"costTime": 1238
},
{
"id": 291340,
"phase": "main_process",
"startTime": "2023-11-01 16:41:21",
"endTime": "2023-11-01 16:41:25",
"costTime": 3692
},
{
"id": 291340,
"phase": "result_upload",
"startTime": "2023-11-01 16:41:25",
"endTime": "2023-11-01 16:41:25",
"costTime": 189
},
{
"id": 291340,
"phase": "postprocess",
"startTime": "2023-11-01 16:41:25",
"endTime": "2023-11-01 16:41:25",
"costTime": 457
}
]
}
# 账单查询服务(非语音类)
# 接口描述
账单查询服务。单次范围最大1000条,超过1000条将不予查询,请缩小查询范围再次尝试。
# 请求地址
POST /api/assist/bill/list
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
owner | Long | True | 任务所属账户 |
algoGroup | Integer | True | 任务组(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,17:互动直播, 44:视频直播) |
algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,17:互动直播, 44:视频直播) |
billStartTime | String | True | 账单开始时间(格式为"YYYY-MM-DD HH:MM:SS") |
billEndTime | String | True | 账单结束时间 (格式为"YYYY-MM-DD HH:MM:SS") |
pageNo | int | False | 当前页码 (默认 1) |
pageSize | int | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"owner": 41 ,
"algoType": "14",
"algoGroup": "14",
"billStartTime": "2024-12-04 00:00:00",
"billEndTime": "2025-01-02 23:59:59",
"pageSize": 10,
"pageNo": 1,
"sortName": "",
"sortValue": ""
}
# 响应元素
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | True | 成功与否,成功是1 ,错误返回null |
- pagination | Pagination | True | 分页信息(参照通用数据结构说明) |
- result | Object | True | 账单列表(参照下面说明) |
- usedSum | String | True | 当前页总用量 |
账单列表
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 任务id |
owner | Long | True | 任务所属账户 |
algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,17:互动直播, 44:视频直播) |
billingValue | Integer | True | 计费值 |
billingUnit | Integer | True | 计费单位 (1:时长 单位:毫秒,2:时长 单位:秒,3:单位:数量) |
billingTime | String | True | 计费时间,格式为"YYYY-MM-DD HH:MM:SS" |
taskId | Long | True | 任务id |
taskName | String | True | 任务名称 |
algoId | String | True | 算法任务id |
status | Integer | True | 3:已取消,5:已完成,9:异常 |
taskIsDelete | String | True | 任务是否被删除(0:未删除, 1:已删除) |
startTime | String | True | 算法开始时间(yyyy-MM-dd HH:mm:ss) |
endTime | String | True | 算法截止时间(yyyy-MM-dd HH:mm:ss) |
resultFile | String | False | 结果文件路径 |
resultThumb | String | False | 结果缩略图路径 |
algoSubType1 | String | True | 人物模型:模型规格:2K/4K,视频合成: 使用人物模型规格:2K/4K |
algoSubType2 | String | False | 视频合成:结果物格式:webm/mp4 |
algoSubType3 | String | False | 视频合成:结果物帧率 |
algoSubType4 | String | False | 子类型4 |
message | String | False | 任务信息 |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 3,
"pageSize": 10,
"startIndex": 0
},
"result": [
{
"id": 601057,
"owner": 41,
"billingValue": 30,
"billingUnit": 2,
"billingTime": "2024-12-27 15:03:09",
"taskId": 20989677953,
"taskName": null,
"algoId": "db1fb10d0007485b8f7f41e6ebd41be7",
"algoType": 17,
"status": 5,
"taskIsDelete": 0,
"startTime": "2024-12-27 15:02:39",
"endTime": "2024-12-27 15:03:09",
"resultFile": null,
"resultThumb": null,
"message": "客户主动关闭",
"algoSubType1": null,
"algoSubType2": null,
"algoSubType3": null,
"algoSubType4": null
},
{
"id": 601056,
"owner": 41,
"billingValue": 1,
"billingUnit": 2,
"billingTime": "2024-12-27 14:58:33",
"taskId": 20989677950,
"taskName": null,
"algoId": "980f8051b5a9499592cd34530fd90cbf",
"algoType": 17,
"status": 5,
"taskIsDelete": 0,
"startTime": "2024-12-27 14:58:32",
"endTime": "2024-12-27 14:58:33",
"resultFile": null,
"resultThumb": null,
"message": "客户主动关闭",
"algoSubType1": null,
"algoSubType2": null,
"algoSubType3": null,
"algoSubType4": null
},
{
"id": 601055,
"owner": 41,
"billingValue": 2,
"billingUnit": 2,
"billingTime": "2024-12-27 14:58:27",
"taskId": 20989677949,
"taskName": null,
"algoId": "787c8923f67c447fbed38df345551789",
"algoType": 17,
"status": 5,
"taskIsDelete": 0,
"startTime": "2024-12-27 14:58:26",
"endTime": "2024-12-27 14:58:28",
"resultFile": null,
"resultThumb": null,
"message": "客户主动关闭",
"algoSubType1": null,
"algoSubType2": null,
"algoSubType3": null,
"algoSubType4": null
}
],
"usedSum": "0.55",
"usedModel2kSum": null,
"usedModel4kSum": null
}
}
# 账单查询服务(语音类)
# 接口描述
语音账单查询服务。
# 请求地址
POST /api/assist/bill/voice/list
# 请求参数
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
owner | Long | True | 任务所属账户 |
algoType | Integer | True | 任务组(30: "ASR", 31: "TTS") |
billStartTime | String | True | 账单开始时间(格式为"YYYY-MM-DD HH:MM:SS") |
billEndTime | String | True | 账单结束时间 (格式为"YYYY-MM-DD HH:MM:SS") |
algoSubType1 | String | True | PAAS_HTTP,PAAS_WS,PAAS_VIDEO_2D,PAAS_VIDEO_MIX,PAAS_LIVE |
algoSubType2 | String | True | ASR5, TTS3, TTS4, TTS5, TTS7, TTS8 |
statRange | String | True | 统计范围 1:日账单 ,2: 月账单 |
pageNo | int | False | 当前页码 (默认 1) |
pageSize | int | False | 每页条数 (默认 10) |
sortName | String | False | 排序字段名 |
sortValue | String | False | 排序顺序: asc, desc |
# 请求样例
{
"owner": 41,
"algoType": "30",
"billStartTime": "2024-12-04 00:00:00",
"billEndTime": "2025-01-03 23:59:59",
"statRange": 1,
"algoSubType1": "",
"algoSubType2": "",
"pageSize": 10,
"pageNo": 1,
"sortName": "",
"sortValue": ""
}
# 响应元素
字段 | 类型 | 必填 | 说明 |
---|---|---|---|
code | Integer | True | 0 - 成功, 其他 - 异常 |
message | String | True | 异常详细信息 |
data | Object | True | 成功与否,成功是1 ,错误返回null |
- pagination | Pagination | True | 分页信息(参照通用数据结构说明) |
- result | Object | True | 账单列表(参照下面说明) |
账单列表
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
id | Long | True | 任务id |
owner | Long | True | 任务所属账户 |
algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,17:互动直播, 44:视频直播) |
billingValue | Integer | True | 计费值 |
billingUnit | Integer | True | 计费单位 (1:时长 单位:毫秒,2:时长 单位:秒,3:单位:数量) |
billingDate | String | True | 计费日期,格式为"YYYY-MM-DD" |
billingMonth | String | False | 计费月份 |
algoSubType1 | String | True | PAAS_HTTP,PAAS_WS,PAAS_VIDEO_2D,PAAS_VIDEO_MIX,PAAS_LIVE |
algoSubType2 | String | True | ASR5, TTS3, TTS4, TTS5, TTS7, TTS8 |
# 响应样例
{
"code": 0,
"message": "success",
"data": {
"pagination": {
"pageNo": 1,
"numberPages": 1,
"numberRecords": 4,
"pageSize": 10,
"startIndex": 0
},
"result": [
{
"id": 13635,
"owner": 260,
"billingValue": 0.0045,
"billingUnit": 3,
"billingDate": "2024-12-27",
"billingMonth": null,
"algoSubType1": "PAAS_VIDEO_MIX",
"algoSubType2": "TTS5",
"algoType": 31
},
{
"id": 13631,
"owner": 260,
"billingValue": 0.0347,
"billingUnit": 3,
"billingDate": "2024-12-27",
"billingMonth": null,
"algoSubType1": "PAAS_VIDEO_2D",
"algoSubType2": "TTS5",
"algoType": 31
},
{
"id": 12441,
"owner": 260,
"billingValue": 0.0347,
"billingUnit": 3,
"billingDate": "2024-12-06",
"billingMonth": null,
"algoSubType1": "PAAS_VIDEO_2D",
"algoSubType2": "TTS5",
"algoType": 31
},
{
"id": 12433,
"owner": 260,
"billingValue": 0.0347,
"billingUnit": 3,
"billingDate": "2024-12-06",
"billingMonth": null,
"algoSubType1": "PAAS_VIDEO_2D",
"algoSubType2": "TTS3",
"algoType": 31
}
]
}
}
# 任务完成回调参数
使用API时,系统将通过填写的接口回调地址,返回任务状态等信息,若需要任务回调功能,则需联系管理员在创建账户时提供接口回调地址。 如果用户配置了AuthKey将返回鉴权信息timestamp和signature,具体参考<HTTP回调事件通知>。
提供的接口实现中HTTP Method为POST,Content-Type应为application/json
。
字段 | 类型 | 必填 | 描述 |
---|---|---|---|
taskId | Integer | True | 任务 id |
materialId | Integer | True | 素材 id |
materialName | String | True | 素材名称 |
algoType | Integer | True | 任务类型(11:TTS音色模型生成,12:人物形象模型生成,14:视频合成,20: 视频人物换脸,18:人物形象模型更新,25:音色转换, 32:图片绿幕分割预览,33:视频绿幕分割预览,41:TTS V3音色模型生成,42:口水话(快速答复库),43:文件预热 |
algoSubType1 | String | True | 人物模型:模型规格:2K/4K,视频合成:使用人物模型规格:2K/4K |
algoSubType2 | String | False | 视频合成:结果物格式:webm/mp4 |
algoSubType3 | String | False | 视频合成:结果帧率 |
status | Integer | True | 状态 3:已取消,5:已完成,9:异常 |
taskResult | String | False | 报错信息 |
以上即为平台可以提供的全部算法能力。