Element
Create Element
The service related to creating entities has been upgraded to a brand new version. If you need to browse the old version, please proceed to:Kling AI (OLD VERSION) ELEMENTS API Specification
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Request Body
Element Name
Must not exceed 20 characters.
Element Description
Must not exceed 100 characters.
Reference Method
video_refer: Video Character Elements, at this time, the subject's appearance will be defined with reference to element_video_list.
image_refer: Multi-Image Elements, whose appearance will be defined with reference to the element_image_list.
The scope of availability differs between entities customized through videos and those customized through images. Please refer to the capability map and parameter specifications for details.
The main reference image allows for the setting of the element and its details through multiple images.
Include front reference images and reference images from other angles or close-ups: at least one frontal reference image (frontal_image), and 1 to 3 additional reference images (image_url) that differ from the front.
Load with key:value format as follows:
Supports inputting image Base64 encoding or image URL (ensure accessibility).
Supported image formats: .jpg / .jpeg / .png. Image file size cannot exceed 10MB, dimensions not less than 300px, aspect ratio between 1:2.5 ~ 2.5:1.
When reference_type is image_refer, this parameter is required.
The element is referenced by the video, and its details can be set through the video.
Audio videos can be uploaded. If the audio video contains human voice, it will trigger voice customization (customization + inclusion in voice library + binding with the element).
Currently, only realistic-style humanoid figures can be customized through video.
Required when referencing videos; invalid when referencing images.
Structure: element_video_list: { refer_videos: [{ video_url: "video_url_1" }] }. Only .mp4/.mov formats. Duration 3s–8s, 1080P, aspect ratio 16:9 or 9:16. At most 1 video, size not exceeding 200MB. video_url must not be empty.
Video-customized elements are only supported for kling-video-o3 and later models.
The voice ID of element can be bound to existing tone colors in the tone library
- When the current parameter is empty, the current entity is not bound to a tone color.
- The ID can be obtained through the voice-related API. For details, see Voice Guide
Configure tags for the subject, one subject can configure multiple tags.
Structure: tag_list: [{ tag_id: "o_101" }, { tag_id: "o_102" }, ...]. Tag ID and name: o_101 Hottest, o_102 Character, o_103 Animal, o_104 Item, o_105 Costume, o_106 Scene, o_107 Effect, o_108 Others.
Tag and tag_id correspondence:
| tag_id | tag_name |
|---|---|
| o_101 | Hottest |
| o_102 | Character |
| o_103 | Animal |
| o_104 | Item |
| o_105 | Costume |
| o_106 | Scene |
| o_107 | Effect |
| o_108 | Others |
The callback notification address for the result of this task. If configured, the server will actively notify when the task status changes.
- For the specific message schema, see Callback Protocol
Customized Task ID. Users can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries. Please note that the customized task ID must be unique within a single user account.
Invocation examples
Create Multi-Image Elements
Create Video Character Elements
Query Custom Element (Single)
The service related to creating entities has been upgraded to a brand new version. If you need to browse the old version, please proceed to:Kling AI (OLD VERSION) ELEMENTS API Specification
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Path Parameters
The task ID of the element creation task. Request path parameter, directly fill the value in the request path.
Customized Task ID for audio generation
- The external_task_id filled in when creating the task. You can choose to query by external_task_id or task_id
- When creating a task, you can choose to query by external_task_id or task_id.
Query Custom Element (List)
The service related to creating entities has been upgraded to a brand new version. If you need to browse the old version, please proceed to:Kling AI (OLD VERSION) ELEMENTS API Specification
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Query Parameters
Page number
Value range: [1, 1000]
Data volume per page
Value range: [1, 500]
Query Presets Element (List)
The service related to creating entities has been upgraded to a brand new version. If you need to browse the old version, please proceed to:Kling AI (OLD VERSION) ELEMENTS API Specification
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Query Parameters
Page number
Value range: [1, 1000]
Data volume per page
Value range: [1, 500]
Delete Custom Element
The services related to the delete custom element have been directly upgraded, eliminating the need to browse other documents
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Request Body
The ID of the element to be deleted; only supports deleting custom elements.