数字人形象接口
创建形象并查询当前用户可见的形象。
当前环境请求基址
https://api.jiuma.com创建数字人形象
根据图片或视频创建可复用形象;该路由实际执行 createHumanV2。
POST
/digitalHumanVideo/createHuman请求地址:https://api.jiuma.com/digitalHumanVideo/createHuman
请求参数
| 参数 | 类型 | 要求 | 说明 |
|---|---|---|---|
file_url | string | 必填 | 文件 ID、http/https URL 或 base64 图片/视频 |
name | string | 选填 | 形象名称;默认生成时间名称 |
role_type | int | 选填 | 1 未知、2 真人、3 卡通、4 动物 |
gender | int | 选填 | 0 未知、1 男、2 女 |
age | int | 选填 | 年龄 |
请求示例
cURL · Bash / macOS / Linux
curl -X POST "https://api.jiuma.com/digitalHumanVideo/createHuman" \
-H "X-Secret-Key: <secret_id-secret_key>" \
-d "file_url=123&name=客服形象"响应示例
JSON
{
"code": 200,
"message": "创建成功",
"data": 456
}关键返回字段
data- 创建成功后返回数字人形象 ID,可作为视频创建接口的 video_url。
常见失败原因
缺少素材、素材无法解析、视频不符合训练要求、创建失败。
获取数字人形象列表
分页查询当前用户可用的内置和自定义形象。
POST
/digitalHumanVideo/describeHumanList请求地址:https://api.jiuma.com/digitalHumanVideo/describeHumanList
请求参数
| 参数 | 类型 | 要求 | 说明 |
|---|---|---|---|
page | int | 选填 | 页码,默认 1 |
list_rows | int | 选填 | 每页条数,默认 15 |
belong_type | int | 选填 | 1 内置、2 自定义;不传查询全部可用形象 |
请求示例
cURL · Bash / macOS / Linux
curl -X POST "https://api.jiuma.com/digitalHumanVideo/describeHumanList" \
-H "X-Secret-Key: <secret_id-secret_key>" \
-d "page=1&list_rows=15"响应示例
JSON
{
"code": 200,
"message": "操作成功",
"data": {
"total": 1,
"per_page": 15,
"current_page": 1,
"data": [
{
"id": 456,
"name": "客服形象",
"file_url": "https://example.com/portrait.jpg"
}
]
}
}常见失败原因
分页参数不正确、查询失败;没有可用形象时返回空列表。