Используйте endpoint Kling Add Video Selection, чтобы добавлять элементы выделения при редактировании видео с несколькими элементами, обеспечивая точечные изменения и управление сценой через CometAPI.
curl --request POST \
--url https://api.cometapi.com/kling/v1/videos/multi-elements/add-selection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "784914037360041984",
"frame_index": 1,
"points": [
{
"x": 0,
"y": 1
}
]
}
'{
"code": 123,
"message": "<string>",
"data": {}
}Используйте этот endpoint, чтобы отметить область видео, с которой должен работать мультимодальный редактор.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
session_id берётся из Initialize Video for Editingframe_index выбирает кадр, на котором вы размещаете точкиpoints — это нормализованные координаты в диапазоне от 0 до 1Initialize first
session_id.Add or refine points
Preview the area
Bearer token authentication. Use your CometAPI key.
Session ID, generated based on the video initialization task, does not change with selection editing actions.
Frame number
Supports adding up to 10 marked frames, meaning video selections can be marked based on a maximum of 10 frames. Only 1 frame can be marked at a time.
Click coordinates, represented by x and y. Value range: [0,1], expressed as a percentage; [0,1] represents the top-left corner of the frame. Supports adding multiple marked points simultaneously, with a maximum of 10 points per frame.
Show child attributes
curl --request POST \
--url https://api.cometapi.com/kling/v1/videos/multi-elements/add-selection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "784914037360041984",
"frame_index": 1,
"points": [
{
"x": 0,
"y": 1
}
]
}
'{
"code": 123,
"message": "<string>",
"data": {}
}