Skip to content

公共数字人

请求地址

http
GET  /open/v1/list_common_dp
http
access_token: {{access_token}}

请求参数 Query Params

KeyValue说明
page1当前页
size10每页数量
source来源(整型,可选;具体取值以平台说明为准)
tag_ids1,2标签 ID,可重复传参或使用逗号分隔;多个 ID 之间为交集(AND),仅返回同时包含所传全部标签的 SKU。标签 ID 请通过 标签字典 获取

参数说明

字段说明
page当前页
size每页数量
source来源筛选(可选)
tag_ids标签 ID 列表;多值为 AND 语义;与列表项中的 tag_ids / tag_names 对应同一套标签体系(数据来自 dp_digital_person_sku

响应

响应示例

json
{
    "trace_id": "4cb8b3edefd2f4e734246e7c39237506",
    "code": 0,
    "msg": "success",
    "data": {
        "list": [
            {
                "id": "1421df93d7754ee19dcaa18e85b68f39",
                "name": "文昊",
                "figures": [
                    {
                        "pic_path": "https://res.chanjing.cc/chanjing/res/person/2024-07-02/a0068cec-4705-464a-b808-59eea81d6804_cover.png",
                        "type": "sit_body",
                        "cover": "https://res.chanjing.cc/chanjing/res/person/2024-07-02/a0068cec-4705-464a-b808-59eea81d6804_cover.png",
                        "width": 1080,
                        "height": 1920,
                        "preview_video_url": "https://res.chanjing.cc/chanjing/res/person/2024-07-02/717c08bd-1105-44b8-b510-a68e6b1817e5_480.webm"
                    },
                    {
                        "pic_path": "https://res.chanjing.cc/chanjing/res/person/2024-07-02/57088ee1-c040-418d-974f-fce13b8e0f7d_cover.png",
                        "type": "circle_view",
                        "cover": "https://res.chanjing.cc/chanjing/res/person/2024-07-02/57088ee1-c040-418d-974f-fce13b8e0f7d_cover.png",
                        "width": 728,
                        "height": 728,
                        "preview_video_url": "https://res.chanjing.cc/chanjing/res/person/2024-07-02/489157a8-f164-422c-9748-d8758131aa09_480.webm"
                    }
                ],
                "gender": "",
                "width": 0,
                "height": 0,
                "audio_name": "磁性中年男声",
                "audio_man_id": "C-CASE-d8dfe5838e774124b04e0ad41c194847",
                "audio_preview": "https://res.chanjing.cc/chanjing/res/upload/tts/2024-04-18/e208dbf0822068c6f27342052235ad30.wav",
                "tag_ids": [101, 205],
                "tag_names": ["美妆", "竖屏"]
            }
        ],
        "page_info": {
            "page": 1,
            "size": 20,
            "total_count": 6,
            "total_page": 1
        }
    }
}

响应字段说明

一级字段二级字段三级字段四级字段说明
code响应状态码
message响应消息
data响应数据
list列表数据数字人-列表数据
id数字人形象id
name数字人名称
gender性别
tag_ids该数字人 SKU 关联的标签 ID 列表(同一 dp_id 多 SKU 时为并集、升序;与 tag_names 按下标一一对应)
tag_namestag_ids 同下标对应的标签名称;主数据无名称时为空字符串
figures列表数据数字人形象列表
type形象类型: whole_body(全身), circle_view(头像),sit_body(坐姿) 使用公共数字人创建视频时必传
cover形象地址
width
height
preview_video_url数字人预览地址
bg_replace布尔类型。能否替换背景
audio_man_id数字人的声音音色id
audio_name音色名称
audio_preview音色预览地址
audio_lang音色支持语言(en英文、cn中文、multilingual多语言)
page_info分页信息
page当前页码
size页面大小
total_count数字人总数
total_page总页数

响应状态码说明

code说明
0响应成功
10400AccessToken验证失败
40000参数错误
50000系统内部错误
51000系统内部错误

示例代码

shell
curl -L -X GET 'https://www.chanjing.cc/api/open/v1/list_common_dp?page=1&size=10&tag_ids=101,205' -H 'access_token: {{your_token}}' -H 'Content-Type: application/json'
go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "https://www.chanjing.cc/api/open/v1/list_common_dp?page=1&size=10&tag_ids=101,205"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("access_token", "{{your_token}}")
  req.Header.Add("Content-Type", "")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://www.chanjing.cc/api/open/v1/list_common_dp?page=1&size=10&tag_ids=101,205")
  .method("GET", body)
  .addHeader("access_token", "{{your_token}}")
  .addHeader("Content-Type", "")
  .build();
Response response = client.newCall(request).execute();
py
import requests

url = "https://www.chanjing.cc/api/open/v1/list_common_dp?page=1&size=10&tag_ids=101,205"

payload = {}
headers = {
  'access_token': '{{your_token}}',
  'Content-Type': ''
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)