> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# kling-element-create

> 上传参考图片，创建可复用的自定义主体。支持人物、动物、道具、服饰、场景、特效等分类。
返回 `task_id`，通过查询接口轮询直到 `task_status` 为 `succeed`。




## OpenAPI

````yaml zh/api-reference/model-api/kuaishou/openapi/kling-element-create/openapi.yaml POST /kling/v1/general/advanced-custom-elements
openapi: 3.1.0
info:
  title: Kling 创建自定义主体
  description: 创建自定义主体（人物、场景、道具等），用于 Kling 视频生成
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /kling/v1/general/advanced-custom-elements:
    post:
      summary: 创建自定义主体
      description: |
        上传参考图片，创建可复用的自定义主体。支持人物、动物、道具、服饰、场景、特效等分类。
        返回 `task_id`，通过查询接口轮询直到 `task_status` 为 `succeed`。
      operationId: createKlingCustomElementZh
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - element_name
                - element_description
                - reference_type
                - element_image_list
                - tag_list
              properties:
                element_name:
                  type: string
                  description: 主体名称。
                  example: my-character
                element_description:
                  type: string
                  description: 主体描述。
                  example: 视频系列主角
                reference_type:
                  type: string
                  description: 参考类型，固定为 `image_refer`。
                  enum:
                    - image_refer
                  example: image_refer
                element_image_list:
                  type: object
                  required:
                    - frontal_image
                    - refer_images
                  properties:
                    frontal_image:
                      type: string
                      description: 正面参考图片 URL。
                      example: https://example.com/frontal.jpg
                    refer_images:
                      type: array
                      description: 其他参考图片。
                      items:
                        type: object
                        required:
                          - image_url
                        properties:
                          image_url:
                            type: string
                            description: 参考图片 URL。
                            example: https://example.com/side.jpg
                tag_list:
                  type: array
                  description: |
                    标签列表。可用 tag_id：
                    - `o_101`：热梗
                    - `o_102`：人物（Character）
                    - `o_103`：动物
                    - `o_104`：道具
                    - `o_105`：服饰
                    - `o_106`：场景（Scene）
                    - `o_107`：特效
                    - `o_108`：其他
                  items:
                    type: object
                    required:
                      - tag_id
                    properties:
                      tag_id:
                        type: string
                        example: o_102
      responses:
        '200':
          description: 主体创建任务已提交
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 任务 ID
                    example: '863121016086724692'
                  task_id:
                    type: string
                    description: 任务 ID（同 id）
                    example: '863121016086724692'
                  object:
                    type: string
                    description: 固定 `video`
                    example: video
                  model:
                    type: string
                    description: 固定 `kling-element`
                    example: kling-element
                  status:
                    type: string
                    description: 初始为空
                    example: ''
                  progress:
                    type: integer
                    description: 进度 0–100
                    example: 0
                  created_at:
                    type: integer
                    description: Unix 时间戳
                    example: 1773812605
        '400':
          description: 请求参数有误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````