主体(旧)

POST /kling/v1/general/custom-elements

MethodPOST
Path/kling/v1/general/custom-elements
Typehttp
Status1
Module2102810
Folder75112754

概览

MethodPOST
Path/kling/v1/general/custom-elements
Typehttp
Status1
Module2102810
Folder75112754

参数

{
  "header": [
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "C1O6m7YJRK",
      "enable": true,
      "name": "Content-Type",
      "sampleValue": "application/json"
    },
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "Bd2EHr4vPQ",
      "enable": true,
      "name": "Authorization",
      "sampleValue": "Bearer {{YOUR_API_KEY}}"
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "element_name": {
        "type": "string",
        "description": "主体名称\n不能超过20个字符"
      },
      "element_description": {
        "type": "string",
        "description": "主体描述\n不能超过100个字符"
      },
      "element_frontal_image": {
        "type": "string",
        "description": "主体正面参考图\n支持传入图片Base64编码或图片URL(确保可访问)\n图片格式支持.jpg / .jpeg / .png\n图片文件大小不能超过10MB,图片宽高尺寸不小于300px,图片宽高比要在1:2.5 ~ 2.5:1之间"
      },
      "element_refer_list": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "image_url": {
              "type": "string"
            }
          },
          "required": [
            "image_url"
          ],
          "x-apifox-orders": [
            "image_url"
          ]
        },
        "description": "主体其他参考列表\n可通过上传多张、不同角度的主体参考图来定义主体外观\n至少上传1张参考图,至多上传3张参考图\n用key:value承载,其中具体如下:\n1\n2\n3\n4\n5\n\"element_refer_list\":[\n  {\"image_url\":\"image_url_1\"},\n  {\"image_url\":\"image_url_2\"},\n  {\"image_url\":\"image_url_3\"}\n]"
      }
    },
    "required": [
      "element_name",
      "element_description",
      "element_frontal_image",
      "element_refer_list"
    ],
    "x-apifox-orders": [
      "element_name",
      "element_description",
      "element_frontal_image",
      "element_refer_list"
    ]
  },
  "required": true,
  "mediaType": "",
  "examples": [
    {
      "mediaType": "application/json",
      "value": "{\r\n    \"element_name\": \"\",\r\n    \"element_description\": \"\",\r\n    \"element_frontal_image\": \"\",\r\n    \"element_refer_list\": \"\"\r\n}"
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 198965162,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {}
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": []
  }
]