> ## 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-query

> 查询自定义主体创建任务的状态和结果。轮询直到 `task_status` 为 `succeed` 或 `failed`。



## OpenAPI

````yaml zh/api-reference/model-api/kuaishou/openapi/kling-element-query/openapi.yaml GET /kling/v1/general/advanced-custom-elements/{task_id}
openapi: 3.1.0
info:
  title: Kling 查询自定义主体
  description: 通过 task_id 查询自定义主体创建任务的状态和结果
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /kling/v1/general/advanced-custom-elements/{task_id}:
    get:
      summary: 查询自定义主体
      description: 查询自定义主体创建任务的状态和结果。轮询直到 `task_status` 为 `succeed` 或 `failed`。
      operationId: queryKlingCustomElementZh
      parameters:
        - name: task_id
          in: path
          required: true
          description: 创建主体接口返回的任务 ID。
          schema:
            type: string
            example: '863121016086724692'
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: SUCCEED
                  request_id:
                    type: string
                  data:
                    type: object
                    properties:
                      task_id:
                        type: string
                      task_status:
                        type: string
                        enum:
                          - submitted
                          - succeed
                          - failed
                        description: 任务状态。
                      task_result:
                        type: object
                        properties:
                          elements:
                            type: array
                            items:
                              $ref: '#/components/schemas/Element'
                      created_at:
                        type: integer
                        description: 创建时间（毫秒时间戳）
                      updated_at:
                        type: integer
                        description: 更新时间（毫秒时间戳）
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Element:
      type: object
      properties:
        element_id:
          type: integer
          description: 主体 ID（用于删除操作）
        element_name:
          type: string
        element_description:
          type: string
        element_type:
          type: string
          example: image_refer
        element_image_list:
          type: object
          properties:
            frontal_image:
              type: string
              description: 正面图片 CDN 链接
            refer_images:
              type: array
              items:
                type: object
                properties:
                  image_url:
                    type: string
        owned_by:
          type: string
          description: 拥有者用户 ID（官方预设为 "kling"）
        status:
          type: string
          enum:
            - succeed
            - failed
        tag_list:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````