POST
/kling/v1/general/advanced-custom-elements主体(新版本)
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/kling/v1/general/advanced-custom-elements \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"element_name": "主体ysh11112311213",
"element_description": "测试",
"reference_type": "image_refer",
"element_image_list": {
"frontal_image": "https://imageproxy.zhongzhuan.chat/api/proxy/image/bb9bd34363da4fa486c9e645a6b1349e.png",
"refer_images": [
{
"image_url": "https://imageproxy.zhongzhuan.chat/api/proxy/image/bb9bd34363da4fa486c9e645a6b1349e.png"
}
]
},
// "element_video_list": {
// "refer_videos": [
// {
// "video_url": "xxx"
// }
// ]
// },
// "element_voice_id": string,
// "tag_list": [
// {
// "tag_id": "xxx"
// }
// ],
// "callback_url": "xxx",
// "external_task_id": ""
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Content-Type | Header | string | 否 | - | application/json |
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
element_name | JSON body | string | 是 | 不能超过20个字符 | - |
element_description | JSON body | string | 是 | 不能超过100个字符 | - |
reference_type | JSON body | string | 是 | 枚举值:video_refer、 image_refer video_refer: 视频角色主体,此时将参考element_video_list定义主体外表 image_refer: 多图主体,此时将参考element_image_list定义主体外表 通过视频定制的主体和通过图片定制的主体的可用范围不同,详见能力地图和参数说明。 | - |
element_image_list | JSON body | object | 否 | 可通过多张图片设定主体及其细节 包括正面参考图和其他角度或特写参考图,其中:至少包括1张正面参考图,由frontal_image参数定义;需包括1~3张其他参考图,需与正面参考图有差异,由image_url参数定义 用key:value承载,如下: "element_image_list": { "frontal_image": "image_url_0", "refer_images": [{ "image_url": "image_url_1" }, ...] } 支持传入图片Base64编码或图片URL(确保可访问) 图片格式支持.jpg / .jpeg / .png。图片文件大小不能超过10MB,图片宽高尺寸不小于300px,图片宽高比要在1:2.5 ~ 2.5:1之间 reference_type参数值为 image_refer 时,当前参数必填 | - |
element_image_list.frontal_image | JSON body | string | 否 | - | - |
element_image_list.refer_images | JSON body | array<object> | 否 | - | - |
element_image_list.refer_images[].image_url | JSON body | string | 是 | - | - |
element_video_list | JSON body | object | 否 | 可通过视频设定主体及其细节 可上传有声视频,有声视频包含人声则触发音色定制(定制+入音色库+与主体绑定) 暂时仅支持通过视频定制写实风格的人形形象 参考视频时当前参数必填,参考图片时当前参数无效 用key:value承载。视频格式仅支持MP4/MOV。仅支持时长介于3s~8s之间、宽高比例需为16:9或9:16的1080P视频。至多仅支持上传1段视频,视频大小不超过200MB。video_url参数值不得为空 "element_video_list": { "refer_videos": [{ "video_url": "video_url_1" }, ...] } 视频定制的主体仅支持用于 kling-video-o3 及之后的模型 | - |
element_video_list.refer_videos | JSON body | array<object> | 否 | - | - |
element_video_list.refer_videos[].video_url | JSON body | string | 否 | - | - |
element_voice_id | JSON body | string | 否 | 可绑定音色库中已有音色 当前参数为空时,当前主体不绑定音色 可通过音色相关API获取ID,点此查看 仅视频定制的主体支持绑定音色 | - |
tag_list | JSON body | array<object> | 否 | 一个主体可以配置多个标签 用key:value承载。tag的ID与名称:o_101 热梗, o_102 人物, o_103 动物, o_104 道具, o_105 服饰, o_106 场景, o_107 特效, o_108 其他 | - |
tag_list[].tag_id | JSON body | string | 否 | - | - |
callback_url | JSON body | string | 否 | 本次任务结果回调通知地址,如果配置,服务端会在任务状态发生变更时主动通知 | - |
external_task_id | JSON body | string | 否 | 自定义任务ID。用户自定义任务ID,传入不会覆盖系统生成的任务ID,但支持通过该ID进行任务查询。请注意,单用户下需要保证唯一性 | - |
返回响应 (200)
此部分没有定义参数。
来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899828,
"name": "主体(新版本)",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/kling/v1/general/advanced-custom-elements",
"tags": [],
"status": 1,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"element_name": {
"type": "string",
"description": "不能超过20个字符",
"title": "主体名称"
},
"element_description": {
"type": "string",
"title": "主体描述",
"description": "不能超过100个字符"
},
"reference_type": {
"type": "string",
"title": "主体参考方式",
"description": "枚举值:video_refer、 image_refer\nvideo_refer: 视频角色主体,此时将参考element_video_list定义主体外表\nimage_refer: 多图主体,此时将参考element_image_list定义主体外表\n通过视频定制的主体和通过图片定制的主体的可用范围不同,详见能力地图和参数说明。"
},
"element_image_list": {
"type": "object",
"properties": {
"frontal_image": {
"type": "string"
},
"refer_images": {
"type": "array",
"items": {
"type": "object",
"properties": {
"image_url": {
"type": "string"
}
},
"required": [
"image_url"
],
"x-apifox-orders": [
"image_url"
]
}
}
},
"x-apifox-orders": [
"frontal_image",
"refer_images"
],
"title": "主体参考图",
"description": "可通过多张图片设定主体及其细节\n\n包括正面参考图和其他角度或特写参考图,其中:至少包括1张正面参考图,由frontal_image参数定义;需包括1~3张其他参考图,需与正面参考图有差异,由image_url参数定义\n\n用key:value承载,如下:\n\n\"element_image_list\": {\n\"frontal_image\": \"image_url_0\", \n\"refer_images\": [{ \"image_url\": \"image_url_1\" }, ...] \n}\n支持传入图片Base64编码或图片URL(确保可访问)\n\n图片格式支持.jpg / .jpeg / .png。图片文件大小不能超过10MB,图片宽高尺寸不小于300px,图片宽高比要在1:2.5 ~ 2.5:1之间\n\nreference_type参数值为 image_refer 时,当前参数必填"
},
"element_video_list": {
"type": "object",
"properties": {
"refer_videos": {
"type": "array",
"items": {
"type": "object",
"properties": {
"video_url": {
"type": "string"
}
},
"x-apifox-orders": [
"video_url"
]
}
}
},
"x-apifox-orders": [
"refer_videos"
],
"title": "主体参考视频",
"description": "可通过视频设定主体及其细节\n\n可上传有声视频,有声视频包含人声则触发音色定制(定制+入音色库+与主体绑定)\n\n暂时仅支持通过视频定制写实风格的人形形象\n\n参考视频时当前参数必填,参考图片时当前参数无效\n\n用key:value承载。视频格式仅支持MP4/MOV。仅支持时长介于3s~8s之间、宽高比例需为16:9或9:16的1080P视频。至多仅支持上传1段视频,视频大小不超过200MB。video_url参数值不得为空\n\n\"element_video_list\": {\n\"refer_videos\": [{ \"video_url\": \"video_url_1\" }, ...] \n}\n视频定制的主体仅支持用于 kling-video-o3 及之后的模型"
},
"element_voice_id": {
"type": "string",
"title": "主体音色",
"description": "可绑定音色库中已有音色\n\n当前参数为空时,当前主体不绑定音色\n\n可通过音色相关API获取ID,点此查看\n\n仅视频定制的主体支持绑定音色"
},
"tag_list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tag_id": {
"type": "string"
}
},
"x-apifox-orders": [
"tag_id"
]
},
"title": "主体配置标签",
"description": "一个主体可以配置多个标签\n\n用key:value承载。tag的ID与名称:o_101 热梗, o_102 人物, o_103 动物, o_104 道具, o_105 服饰, o_106 场景, o_107 特效, o_108 其他"
},
"callback_url": {
"type": "string",
"description": "本次任务结果回调通知地址,如果配置,服务端会在任务状态发生变更时主动通知"
},
"external_task_id": {
"type": "string",
"description": "自定义任务ID。用户自定义任务ID,传入不会覆盖系统生成的任务ID,但支持通过该ID进行任务查询。请注意,单用户下需要保证唯一性"
}
},
"required": [
"element_name",
"element_description",
"reference_type"
],
"x-apifox-orders": [
"element_name",
"element_description",
"reference_type",
"element_image_list",
"element_video_list",
"element_voice_id",
"tag_list",
"callback_url",
"external_task_id"
]
},
"examples": [
{
"mediaType": "application/json",
"value": "{\r\n \"element_name\": \"主体ysh11112311213\",\r\n \"element_description\": \"测试\",\r\n \"reference_type\": \"image_refer\",\r\n \"element_image_list\": {\r\n \"frontal_image\": \"https://imageproxy.zhongzhuan.chat/api/proxy/image/bb9bd34363da4fa486c9e645a6b1349e.png\",\r\n \"refer_images\": [\r\n {\r\n \"image_url\": \"https://imageproxy.zhongzhuan.chat/api/proxy/image/bb9bd34363da4fa486c9e645a6b1349e.png\"\r\n }\r\n ]\r\n },\r\n // \"element_video_list\": {\r\n // \"refer_videos\": [\r\n // {\r\n // \"video_url\": \"xxx\"\r\n // }\r\n // ]\r\n // },\r\n // \"element_voice_id\": string,\r\n // \"tag_list\": [\r\n // {\r\n // \"tag_id\": \"xxx\"\r\n // }\r\n // ],\r\n // \"callback_url\": \"xxx\",\r\n // \"external_task_id\": \"\"\r\n}"
}
],
"mediaType": "",
"oasExtensions": "",
"required": true,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "9sSJDAeZbC",
"name": "Content-Type",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
},
{
"id": "TDPS7PI4EF",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {},
"responses": [
{
"id": 121359325,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {},
"x-apifox-orders": []
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": []
}
],
"responseExamples": [],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436159,
"ordering": 6,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {}
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-02T03:53:34.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}