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

> Create a custom element from reference images or a reference video. The element can be a character, animal, prop, outfit, scene, or special effect.
Returns a task_id for polling status via the query endpoint.




## OpenAPI

````yaml api-reference/model-api/kling/openapi/kling-element-create/openapi.yaml POST /kling/v2/general/advanced-custom-elements
openapi: 3.1.0
info:
  title: Kling Custom Element Create
  description: >-
    Create a custom element (character, scene, prop, etc.) for use in Kling
    video generation.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /kling/v2/general/advanced-custom-elements:
    post:
      summary: Create Custom Element
      description: >
        Create a custom element from reference images or a reference video. The
        element can be a character, animal, prop, outfit, scene, or special
        effect.

        Returns a task_id for polling status via the query endpoint.
      operationId: createKlingCustomElement
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - element_name
                - element_description
                - reference_type
              properties:
                element_name:
                  type: string
                  maxLength: 20
                  description: Name of the custom element, up to 20 characters.
                  example: my-character
                element_description:
                  type: string
                  maxLength: 100
                  description: Description of the custom element, up to 100 characters.
                  example: A protagonist character for my video series
                reference_type:
                  type: string
                  description: >-
                    Reference method. `image_refer` defines appearance from
                    multiple images; `video_refer` defines a video-character
                    element from one reference video.
                  enum:
                    - image_refer
                    - video_refer
                  example: image_refer
                element_image_list:
                  type: object
                  description: >-
                    Required when `reference_type` is `image_refer`. Provide one
                    frontal image and 1–3 additional images from different
                    angles or close-ups. Images accept accessible URLs or raw
                    Base64; JPG/JPEG/PNG, max 10 MB, min 300 px per side, aspect
                    ratio 1:2.5 to 2.5:1.
                  required:
                    - frontal_image
                    - refer_images
                  properties:
                    frontal_image:
                      type: string
                      description: URL of the frontal reference image.
                      example: https://example.com/frontal.jpg
                    refer_images:
                      type: array
                      minItems: 1
                      maxItems: 3
                      description: >-
                        One to three additional reference images from other
                        angles or close-ups.
                      items:
                        type: object
                        required:
                          - image_url
                        properties:
                          image_url:
                            type: string
                            description: URL of a reference image.
                            example: https://example.com/side.jpg
                element_video_list:
                  type: object
                  description: >-
                    Required when `reference_type` is `video_refer` and ignored
                    for image references. Supports one MP4/MOV video, 3–8
                    seconds, 1080p, 16:9 or 9:16, max 200 MB. Video-character
                    customization is supported by Kling video O3 and later
                    models.
                  required:
                    - refer_videos
                  properties:
                    refer_videos:
                      type: array
                      minItems: 1
                      maxItems: 1
                      items:
                        type: object
                        required:
                          - video_url
                        properties:
                          video_url:
                            type: string
                            description: Public URL of the character reference video.
                element_voice_id:
                  type: string
                  description: >-
                    Optional voice ID to bind to the element. For image-based
                    elements, voice binding is supported only for human or
                    humanoid character elements.
                tag_list:
                  type: array
                  description: |
                    Tag list. Available tag_id values:
                    - `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: Element creation task submitted
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Task ID
                    example: '863121016086724692'
                  task_id:
                    type: string
                    description: Task ID (same as id)
                    example: '863121016086724692'
                  object:
                    type: string
                    description: Fixed value `video`
                    example: video
                  model:
                    type: string
                    description: Fixed value `kling-element`
                    example: kling-element
                  status:
                    type: string
                    description: Initial task status.
                    example: queued
                  progress:
                    type: integer
                    description: Progress 0–100
                    example: 0
                  created_at:
                    type: integer
                    description: Unix timestamp
                    example: 1773812605
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.