video
advanced-custom-elements
background_tasks

Advanced Custom Elements - Create element

Deprecated. This endpoint is deprecated. You can pass reference images directly in the elements array of the Kling V3 video generation endpoints (/ai/video/kling-v3-pro, /ai/video/kling-v3-std) without needing to pre-create elements.

Create reusable custom elements (characters, animals, items, costumes, scenes, effects) from reference images or videos. Elements can be referenced in Kling video generation tasks for consistent identity across videos.

Features:

  • Create elements from multi-angle reference images or a reference video
  • Supports character, animal, item, costume, scene, and effect element types
  • Optionally bind a voice to the element for video generation with speech
  • Elements can be reused across multiple video generation tasks

Reference types:

  • image_refer: Create element from 1 frontal image + up to 3 additional reference images from different angles
  • video_refer: Create element from a single reference video (3-8 seconds, 1080P, mp4/mov)
post/v1/ai/video/kling-advanced-custom-elements

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/video/kling-advanced-custom-elements
  • Auth: API key in header x-magnific-api-key

Request body

element_namestring required

Name of the custom element. Must not exceed 20 characters.

element_descriptionstring required

Description of the custom element. Must not exceed 100 characters.

reference_type'image_refer' | 'video_refer' required

Reference method for defining the element's appearance:

  • image_refer: Multi-Image Elements. The element appearance is defined from reference images (element_image_list). Supported formats: .jpg, .jpeg, .png. Max 10MB per image. Min 300px dimensions. Aspect ratio between 1:2.5 and 2.5:1.
  • video_refer: Video Character Elements. The element appearance is defined from a reference video (element_video_list). Only .mp4/.mov formats, 1080P, 3-8 seconds duration, 16:9 or 9:16 aspect ratio, max 200MB.
element_voice_idstring

Bind the element to an existing voice from the tone library. When empty, the element is not bound to a voice. The voice ID can be obtained through the voice-related API. Only elements customized via video reference support voice binding.

webhook_urlstring uri

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example request

{
  "webhook_url": "https://www.example.com/webhook"
}

Response

OK - Task created successfully

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.