> ## 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 an asynchronous custom Kling element task from reference images or a reference video.

Create a reusable element from reference images or one reference video. The endpoint returns a task ID; query that task until `task_status` is `succeed`, then use the returned `element_id` in supported video requests.

## Key capabilities

* **Image or video reference** — Define a subject with multiple images or one reference video
* **Multiple Categories** — Characters, animals, props, outfits, scenes, special effects
* **Asynchronous result** — Poll the task ID to obtain the final `element_id`

## Quick example

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/kling/v1/general/advanced-custom-elements \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "element_name": "my-character",
      "element_description": "A protagonist character for my video series",
      "reference_type": "image_refer",
      "element_image_list": {
        "frontal_image": "https://example.com/frontal.jpg",
        "refer_images": [{"image_url": "https://example.com/side.jpg"}]
      },
      "tag_list": [{"tag_id": "o_102"}]
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://www.anyfast.ai/kling/v1/general/advanced-custom-elements",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "element_name": "my-character",
          "element_description": "A protagonist character for my video series",
          "reference_type": "image_refer",
          "element_image_list": {
              "frontal_image": "https://example.com/frontal.jpg",
              "refer_images": [{"image_url": "https://example.com/side.jpg"}]
          },
          "tag_list": [{"tag_id": "o_102"}]
      }
  )

  print(f"Task ID: {response.json()['task_id']}")
  ```
</CodeGroup>

## Parameters

| Parameter             | Type   | Required   | Description                                       |
| --------------------- | ------ | ---------- | ------------------------------------------------- |
| `element_name`        | string | Yes        | Element name, up to 20 characters                 |
| `element_description` | string | Yes        | Element description, up to 100 characters         |
| `reference_type`      | string | Yes        | `image_refer` or `video_refer`                    |
| `element_image_list`  | object | For images | `frontal_image` plus one to three `refer_images`  |
| `element_video_list`  | object | For video  | One `refer_videos` item containing `video_url`    |
| `element_voice_id`    | string | No         | Existing voice ID to bind to a compatible subject |
| `tag_list`            | array  | No         | Tag list, each item containing `tag_id`           |

### Available tag\_id values

| tag\_id | Category            |
| ------- | ------------------- |
| `o_101` | 热梗                  |
| `o_102` | Character (人物)      |
| `o_103` | Animal (动物)         |
| `o_104` | Prop (道具)           |
| `o_105` | Outfit (服饰)         |
| `o_106` | Scene (场景)          |
| `o_107` | Special Effect (特效) |
| `o_108` | Other (其他)          |

## Response

The create response returns `id`, `task_id`, `model: "kling-element"`, `status`, `progress`, and `created_at`. Query the task at `GET /kling/v1/general/advanced-custom-elements/{task_id}`.

| Field                                            | Description                                       |
| ------------------------------------------------ | ------------------------------------------------- |
| `data.task_status`                               | `submitted`, `processing`, `succeed`, or `failed` |
| `data.task_result.elements[].element_id`         | Element ID used by video requests                 |
| `data.task_result.elements[].element_image_list` | Processed image references                        |
| `data.task_result.elements[].element_video_list` | Processed video references                        |
| `data.task_result.elements[].element_voice_info` | Bound voice information, when present             |

<Card title="API Reference" icon="code" href="/api-reference/model-api/kuaishou/kling-v3#element-management">
  View the interactive API playground for Kling Element Create.
</Card>

<script src="/public/feedback.js" />
