Saltar al contenido principal
POST
/
kling
/
v1
/
videos
/
multi-elements
/
add-selection
Add selection points to a Kling multimodal session
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": {}
}

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.

Usa este endpoint para marcar la región del video sobre la que quieres que opere el editor multimodal.

Cómo funciona la selección

  • session_id proviene de Initialize Video for Editing
  • frame_index selecciona el fotograma donde colocas los puntos
  • points son coordenadas normalizadas entre 0 y 1
  • La documentación de Kling admite hasta 10 fotogramas marcados y hasta 10 puntos por fotograma

Rol en el flujo de trabajo

1

Initialize first

Comienza con Initialize Video for Editing para obtener un session_id válido.
2

Add or refine points

Llama a este endpoint mientras construyes la región que vas a editar.
3

Preview the area

Usa Preview Selected Video Area antes del envío final.
Para consultar la referencia completa de parámetros, revisa la documentación de la API de Kling.

Autorizaciones

Authorization
string
header
requerido

Bearer token authentication. Use your CometAPI key.

Cuerpo

application/json
session_id
string
predeterminado:784914037360041984
requerido

Session ID, generated based on the video initialization task, does not change with selection editing actions.

frame_index
integer
predeterminado:1
requerido

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.

points
object[]
requerido

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.

Respuesta

200 - application/json

Selection updated.

code
integer
requerido
message
string
requerido
data
object