工作台/帮助中心/API 文档/数字人形象接口

数字人形象接口

创建形象并查询当前用户可见的形象。

当前环境请求基址https://api.jiuma.com

创建数字人形象

根据图片或视频创建可复用形象;该路由实际执行 createHumanV2。

POST/digitalHumanVideo/createHuman

请求地址:https://api.jiuma.com/digitalHumanVideo/createHuman

请求参数

参数类型要求说明
file_urlstring必填文件 ID、http/https URL 或 base64 图片/视频
namestring选填形象名称;默认生成时间名称
role_typeint选填1 未知、2 真人、3 卡通、4 动物
genderint选填0 未知、1 男、2 女
ageint选填年龄

请求示例

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

请求参数

参数类型要求说明
pageint选填页码,默认 1
list_rowsint选填每页条数,默认 15
belong_typeint选填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"
      }
    ]
  }
}

常见失败原因

分页参数不正确、查询失败;没有可用形象时返回空列表。