메인 콘텐츠로 건너뛰기
POST
/
kling
/
v1
/
videos
/
multi-elements
/
init-selection
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/multi-elements/init-selection \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "video_id": "784912347344945152",
  "task_id": "784912347277836288"
}
'
{
  "code": 123,
  "message": "<string>",
  "data": {
    "session_id": "<string>"
  }
}
이 엔드포인트를 사용해 비디오 편집 세션을 열고, 이후 모든 멀티모달 편집 단계에 필요한 session_id를 가져옵니다.

입력 경로 하나 선택

  • Kling에서 생성된 비디오: video_id와 상위 task_id를 함께 전송
  • 외부 비디오 또는 이미 호스팅된 비디오: video_url 전송
  • 두 입력 경로를 동시에 전송하지 마세요

워크플로에서의 역할

1

세션 초기화

원본 클립을 제출하고 반환된 session_id를 저장합니다.
2

선택 지점 표시

편집할 영역을 정의하려면 비디오 선택 추가로 계속 진행하세요.
3

최종 편집 작업 제출

선택 준비가 끝나면 작업 생성으로 계속 진행하세요.
전체 파라미터 참조는 Kling API 문서를 확인하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

본문

application/json
video_id
string
기본값:784912347344945152
필수

The video ID generated by Kling; choose either this or video_url, they cannot be passed simultaneously. Select the video to be edited from historical works using the video ID. Only supports video works generated within the last 30 days; only supports videos with a duration of ≥2 seconds and ≤5.5 seconds, or ≥7 seconds and ≤10.5 seconds. Related to the video_url parameter, they cannot both be empty or both have values.

task_id
string
기본값:784912347277836288
필수

When passing video_id, the task_id from when the video was generated must also be passed.

video_url
string
기본값:https://v15-kling.klingai.com/bs2/upload-ylab-stunt-sgp/se/stream_lake_m2v_img2video_multi_id_v16_std/aa12ae6e-450d-4f36-b2d0-74376b313268_raw_video.mp4?x-kcdn-pid=112372

The URL to get the video. When uploading, pass the video download link. When editing a selection, pass the video URL returned by the interface.

Only supports MP4 and MOV formats. Only supports videos with a duration of ≥2 seconds and ≤5.5 seconds, or ≥7 seconds and ≤10.5 seconds. The width and height dimensions of the video must be between 720px (inclusive) and 2160px (inclusive). Only supports uploading videos at 24, 30, or 60 fps. Related to the video_id parameter, they cannot both be empty or both have values.

응답

200 - application/json

Session initialized.

code
integer
필수
message
string
필수
data
object
필수