- 账户权益管理API
- 短视频离线合成API
- 直播OpenApi
- 调用须知
- 常见问题
- 实时信息同步
- 直播阿凡达模式WS连接
- 直播流程相关
- 直播间详情GET
- 添加直播间素材,创建直播间POST
- 开始直播POST
- 获取开播的详情POST
- 结束直播POST
- 插入播放音频POST
- 获取当前播放的音频信息POST
- 跳转到指定场景指定音频播放POST
- 直播间ping后端的接口 10s/次轮训POST
- 获取当前账号正在直播的直播间信息GET
- 导购商品手动加到插播列表POST
- 开播前更新直播间配置POST
- 直播中更新直播间素材POST
- 直播中插入播放副本到列表POST
- 预览直播接口POST
- 获取预览链接POST
- 获取当前账号正在直播的直播间列表GET
- 直播并发列表接口GET
- 删除直播间 DELETE
- 更新直播间的推流地址POST
- 场景隐藏和公开POST
- 删除当前已有的音频POST
- 新增场景POST
- 场景排序POST
- 直播素材准备和编辑
- 数字人互动
添加直播间素材,创建直播间
POST
/openApiDigitalPerson/liveProcess/createLiveRoom
done
请求参数
Header 参数
authorization
string
必需
示例值:
{{auth|md5}}
req_from
string
必需
示例值:
C
timestamp
integer
时间戳
示例值:
{{timestamp}}
app_id
string
必需
示例值:
{{appId}}
account
string
可选
示例值:
19999999999
Body 参数application/json
name
string
直播间名称
status
string
必需
pushUrl
string
推流地址
pushSecret
string
推流密钥
streamUrl
string
拉流地址
enabledStatus
integer
必需
loopType
string
必需
liveRuleList
array[string]
必需
liveRoomConfig
object
直播间全局配置
type
string
可选
liveType
string
必需
interrupt
boolean
必需
guideGoodsList
array [object {17}]
必需
liveMaterialLibraryId
integer
素材id
materialUrl
string
素材url
enableScope
integer
必需
liveGoodsLibraryIds
array[integer]
启用的商品ids
enableMatting
integer
必需
t0
integer
必需
t1
integer
必需
k
integer
必需
x
string
必需
y
string
必需
width
string
必需
height
string
必需
backgroundAudioUrl
string
特写素材背景音
guideRuleList
array[object (GuideRulePO) {4}]
话术
corpusList
array [object {4}]
商品导购的回复语料
replySource
enum<string>
必需
枚举值:
ANCHORASSISTANT
replyType
enum<string>
必需
枚举值:
TEXTAUDIO
goodsList
array [object {5}]
商品列表
liveGoodsLibraryId
integer
必需
liveScenePOList
array [object {16}]
可选
goodsName
string
必需
categoryCode
integer
商品类型 传1
isExpand
boolean
必需
示例
{
"name": "未命名直播",
"loopType": "ALL_LOOP",
"liveRoomConfig": {
"liveType": "ONE_PEOPLE",
"interrupt": true
},
"liveRuleList": [],
"guideGoodsList": [],
"goodsList": [
{
"liveGoodsLibraryId": 260,
"goodsName": "AI智能课",
"enabledStatus": 1,
"liveScenePOList": [
{
"liveGoodsLibraryId": 260,
"isHide": false,
"name": "1171",
"orderBy": 1,
"voice": "guijie",
"speed": 1,
"volume": 23,
"duration": 100,
"lang": "zh-CN",
"role": "Default",
"style": "default",
"sourceType": 0,
"backgroundAudioUrl": "https://digital-person.oss-cn-hangzhou.aliyuncs.com/live/936/goods_media/0/VOICE/dd9e3d8e-c36c-42c9-aa44-2ce9a2209db2.mp3",
"backgroundVolume": 1,
"dialogFlowList": [
{
"liveMaterialTextId": 164840,
"txtContent": "以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍",
"duration": 33.060936,
"url": "https://digital-person.oss-cn-hangzhou.aliyuncs.com/FileUpload/tmp/tts/a0ff4aa4-b103-4c0f-aa6e-7d1d576a469a.wav",
"audioId": "text_000_164840",
"backgroundVolume": 0.5,
"x": 0,
"y": 0,
"width": 0,
"height": 0
},
{
"liveMaterialTextId": 164839,
"txtContent": "欢迎新进直播间的家人们。留下来,让主播给你讲解你感兴趣的团购哈!",
"duration": 5.66125,
"url": "https://digital-person.oss-cn-hangzhou.aliyuncs.com/FileUpload/tmp/tts/99f63918-db62-4e20-beb2-e6fd93de80d7.wav",
"audioId": "text_001_164839",
"backgroundVolume": 1,
"x": 0,
"y": 0,
"width": 0,
"height": 0
},
{
"liveMaterialTextId": 164842,
"txtContent": "123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品",
"duration": 11.371187,
"url": "https://digital-person.oss-cn-hangzhou.aliyuncs.com/FileUpload/tmp/tts/9f9983a2-4c0c-4d4c-b27d-aefdcc0d8699.wav",
"audioId": "text_002_164842",
"backgroundVolume": 1,
"x": 0,
"y": 0,
"width": 0,
"height": 0
}
],
"materialList": [
{
"liveMaterialLibraryId": 4074596596519864300,
"materialType": 0,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/成都-5_73be83e58bd7b0f.png",
"x": 376.2,
"y": 1361.9667,
"z": 1,
"width": 830.2,
"height": 544.8333,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": 2085705662474423000,
"materialType": 2,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/上海-开元明庭_75b89001e9a48fc.mp4",
"x": 127.93332,
"y": 51.166687,
"z": 3,
"width": 725.3333,
"height": 408,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": 3972997274946412500,
"materialType": 2,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/成都-锦著酒店_650454efa1d11e7.mp4",
"x": 154.70001,
"y": 493.4,
"z": 4,
"width": 704,
"height": 469.3333,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": -193543254181990900,
"materialType": 2,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/成都-谷兹博雅_3d85dae588fdc84.mp4",
"x": 316.43335,
"y": 987.6,
"z": 5,
"width": 640,
"height": 360,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": 763191773565832700,
"materialType": 0,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/声音-大_volume-notice_7d04064eeb56d6f.png",
"x": 196.23334,
"y": 1222.6333,
"z": 6,
"width": 120,
"height": 120,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": -3980003212096529000,
"materialType": 0,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/声音-大_volume-notice_7d04064eeb56d6f.png",
"x": 809.56665,
"y": 516.6333,
"z": 7,
"width": 133.33333,
"height": 133.33333,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": -3595962433051355600,
"materialType": 0,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/静音_volume-mute_aa6642ea877682d.png",
"x": 835.73334,
"y": 166.46667,
"z": 8,
"width": 93.33333,
"height": 93.33333,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": -7894334561643101000,
"materialType": 0,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/声音-大_volume-notice_7d04064eeb56d6f.png",
"x": 809.1,
"y": 662.9667,
"z": 9,
"width": 120,
"height": 120,
"frameWidth": 1080,
"frameHeight": 1920
}
],
"liveDigitalPersonAssetsList": [
{
"digitalPersonAssetsId": 2496,
"templateId": "苦橘子_备用_1700739818596180",
"t0": 70,
"t1": 40,
"k": 7,
"isMatting": true,
"templateValidLength": 216,
"x": -36,
"y": 963,
"z": 2,
"width": 540,
"height": 960,
"frameWidth": 1080,
"frameHeight": 1920
}
],
"backGroundImage": {
"backgroundId": 0,
"name": "",
"url": "https://msstest.sankuai.com/avatar-mgrplatform/成都_ad1ba3a96def28a.jpg",
"frameWidth": 1080,
"frameHeight": 1920
}
},
{
"liveGoodsLibraryId": 260,
"isHide": false,
"name": "1175",
"orderBy": 1,
"voice": "guijie",
"speed": 1,
"volume": 100,
"duration": 100,
"lang": "zh-CN",
"role": "Default",
"style": "default",
"sourceType": 0,
"backgroundAudioUrl": "https://digital-person.oss-cn-hangzhou.aliyuncs.com/live/616/goods_media/1814/audio/170677956935211111.mp3",
"backgroundVolume": 1,
"dialogFlowList": [
{
"txtContent": "",
"liveMaterialLibraryId": 480101,
"duration": 51,
"url": "https://digital-person.oss-cn-hangzhou.aliyuncs.com/live/936/goods_media/0/VOICE/3de6734b-1f76-4c7d-8781-9a7e9d77b0f8.mp3",
"audioId": "audio_020_480101",
"audioUrl": "",
"backgroundVolume": 1,
"x": 0,
"y": 0,
"width": 0,
"height": 0
}
],
"materialList": [
{
"liveMaterialLibraryId": -1226640265282049300,
"materialType": 0,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/成都-9_4fa52a5b37cafcd.png",
"x": 236.66666,
"y": 868,
"z": 1,
"width": 593,
"height": 389.16666,
"frameWidth": 1080,
"frameHeight": 1920
},
{
"liveMaterialLibraryId": -6810748942624701000,
"materialType": 2,
"materialUrl": "https://msstest.sankuai.com/avatar-mgrplatform/成都-锦著酒店_650454efa1d11e7.mp4",
"x": 136.56668,
"y": 113.63336,
"z": 3,
"width": 896,
"height": 597.3333,
"frameWidth": 1080,
"frameHeight": 1920
}
],
"liveDigitalPersonAssetsList": [
{
"digitalPersonAssetsId": 2496,
"templateId": "梦梦_1682331275657_1693879980811882",
"t0": 70,
"t1": 40,
"k": 7,
"isMatting": true,
"x": 270,
"y": 960,
"z": 2,
"width": 540,
"height": 960,
"frameWidth": 1080,
"frameHeight": 1920
}
],
"backGroundImage": {
"backgroundId": 0,
"name": "",
"url": "https://msstest.sankuai.com/avatar-mgrplatform/d99c7d1d1e334887aa929086db4c2c27.png",
"frameWidth": 1080,
"frameHeight": 1920
}
}
],
"categoryCode": 19
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/openApiDigitalPerson/liveProcess/createLiveRoom' \
--header 'authorization: {{auth|md5}}' \
--header 'req_from: C' \
--header 'timestamp: {{timestamp}}' \
--header 'app_id: {{appId}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "未命名直播",
"loopType": "ALL_LOOP",
"liveRoomConfig": {
"liveType": "ONE_PEOPLE",
"interrupt": true
},
"liveRuleList":[
],
"guideGoodsList": [
],
"goodsList": [
{
"liveGoodsLibraryId": 260,
"goodsName":"AI智能课",
"enabledStatus":1,
"liveScenePOList": [
{
"liveGoodsLibraryId":260,
"isHide":false,
"name":"1171",
"orderBy":1,
"voice":"guijie",
"speed":1,
"volume":23,
"duration":100,
"lang":"zh-CN",
"role":"Default",
"style":"default",
"sourceType":0,
"backgroundAudioUrl":"https://digital-person.oss-cn-hangzhou.aliyuncs.com/live/936/goods_media/0/VOICE/dd9e3d8e-c36c-42c9-aa44-2ce9a2209db2.mp3",
"backgroundVolume":1,
"dialogFlowList":[
{
"liveMaterialTextId":164840,
"txtContent":"以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍",
"duration":33.060936,
"url":"https://digital-person.oss-cn-hangzhou.aliyuncs.com/FileUpload/tmp/tts/a0ff4aa4-b103-4c0f-aa6e-7d1d576a469a.wav",
"audioId":"text_000_164840",
"backgroundVolume":0.5,
"x":0,
"y":0,
"width":0,
"height":0
},
{
"liveMaterialTextId":164839,
"txtContent":"欢迎新进直播间的家人们。留下来,让主播给你讲解你感兴趣的团购哈!",
"duration":5.66125,
"url":"https://digital-person.oss-cn-hangzhou.aliyuncs.com/FileUpload/tmp/tts/99f63918-db62-4e20-beb2-e6fd93de80d7.wav",
"audioId":"text_001_164839",
"backgroundVolume":1,
"x":0,
"y":0,
"width":0,
"height":0
},
{
"liveMaterialTextId":164842,
"txtContent":"123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品,以下是第5个商品的介绍,123456是一个不错的商品",
"duration":11.371187,
"url":"https://digital-person.oss-cn-hangzhou.aliyuncs.com/FileUpload/tmp/tts/9f9983a2-4c0c-4d4c-b27d-aefdcc0d8699.wav",
"audioId":"text_002_164842",
"backgroundVolume":1,
"x":0,
"y":0,
"width":0,
"height":0
}
],
"materialList":[
{
"liveMaterialLibraryId":4074596596519864148,
"materialType":0,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/成都-5_73be83e58bd7b0f.png",
"x":376.2,
"y":1361.9667,
"z":1,
"width":830.2,
"height":544.8333,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":2085705662474423145,
"materialType":2,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/上海-开元明庭_75b89001e9a48fc.mp4",
"x":127.93332,
"y":51.166687,
"z":3,
"width":725.3333,
"height":408,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":3972997274946412489,
"materialType":2,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/成都-锦著酒店_650454efa1d11e7.mp4",
"x":154.70001,
"y":493.4,
"z":4,
"width":704,
"height":469.3333,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":-193543254181990905,
"materialType":2,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/成都-谷兹博雅_3d85dae588fdc84.mp4",
"x":316.43335,
"y":987.6,
"z":5,
"width":640,
"height":360,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":763191773565832648,
"materialType":0,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/声音-大_volume-notice_7d04064eeb56d6f.png",
"x":196.23334,
"y":1222.6333,
"z":6,
"width":120,
"height":120,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":-3980003212096528946,
"materialType":0,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/声音-大_volume-notice_7d04064eeb56d6f.png",
"x":809.56665,
"y":516.6333,
"z":7,
"width":133.33333,
"height":133.33333,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":-3595962433051355603,
"materialType":0,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/静音_volume-mute_aa6642ea877682d.png",
"x":835.73334,
"y":166.46667,
"z":8,
"width":93.33333,
"height":93.33333,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":-7894334561643101359,
"materialType":0,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/声音-大_volume-notice_7d04064eeb56d6f.png",
"x":809.1,
"y":662.9667,
"z":9,
"width":120,
"height":120,
"frameWidth":1080,
"frameHeight":1920
}
],
"liveDigitalPersonAssetsList":[
{
"digitalPersonAssetsId":2496,
"templateId":"苦橘子_备用_1700739818596180",
"t0":70,
"t1":40,
"k":7,
"isMatting":true,
"templateValidLength":216,
"x":-36,
"y":963,
"z":2,
"width":540,
"height":960,
"frameWidth":1080,
"frameHeight":1920
}
],
"backGroundImage":{
"backgroundId":0,
"name":"",
"url":"https://msstest.sankuai.com/avatar-mgrplatform/成都_ad1ba3a96def28a.jpg",
"frameWidth":1080,
"frameHeight":1920
}
},
{
"liveGoodsLibraryId":260,
"isHide":false,
"name":"1175",
"orderBy":1,
"voice":"guijie",
"speed":1,
"volume":100,
"duration":100,
"lang":"zh-CN",
"role":"Default",
"style":"default",
"sourceType":0,
"backgroundAudioUrl":"https://digital-person.oss-cn-hangzhou.aliyuncs.com/live/616/goods_media/1814/audio/170677956935211111.mp3",
"backgroundVolume":1,
"dialogFlowList":[
{
"txtContent":"",
"liveMaterialLibraryId":480101,
"duration":51,
"url":"https://digital-person.oss-cn-hangzhou.aliyuncs.com/live/936/goods_media/0/VOICE/3de6734b-1f76-4c7d-8781-9a7e9d77b0f8.mp3",
"audioId":"audio_020_480101",
"audioUrl":"",
"backgroundVolume":1,
"x":0,
"y":0,
"width":0,
"height":0
}
],
"materialList":[
{
"liveMaterialLibraryId":-1226640265282049407,
"materialType":0,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/成都-9_4fa52a5b37cafcd.png",
"x":236.66666,
"y":868,
"z":1,
"width":593,
"height":389.16666,
"frameWidth":1080,
"frameHeight":1920
},
{
"liveMaterialLibraryId":-6810748942624701585,
"materialType":2,
"materialUrl":"https://msstest.sankuai.com/avatar-mgrplatform/成都-锦著酒店_650454efa1d11e7.mp4",
"x":136.56668,
"y":113.63336,
"z":3,
"width":896,
"height":597.3333,
"frameWidth":1080,
"frameHeight":1920
}
],
"liveDigitalPersonAssetsList":[
{
"digitalPersonAssetsId":2496,
"templateId":"梦梦_1682331275657_1693879980811882",
"t0":70,
"t1":40,
"k":7,
"isMatting":true,
"x":270,
"y":960,
"z":2,
"width":540,
"height":960,
"frameWidth":1080,
"frameHeight":1920
}
],
"backGroundImage":{
"backgroundId":0,
"name":"",
"url":"https://msstest.sankuai.com/avatar-mgrplatform/d99c7d1d1e334887aa929086db4c2c27.png",
"frameWidth":1080,
"frameHeight":1920
}
}
],
"categoryCode": 19
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
可选
默认值:
CommonErrorCode.SUCCESS.getCode()
data
integer
可选
requestId
string
请求唯一标记
resultMsg
string
提示信息
默认值:
CommonErrorCode.SUCCESS.getDesc()
host
string
业务主机名
默认值:
getHostName()
errorStackTrace
string
异常堆栈
示例
{
"code": 0,
"data": 0,
"requestId": "",
"resultMsg": "",
"host": "",
"errorStackTrace": ""
}
修改于 2024-05-24 08:05:44