Kling 멀티모달 편집 작업 생성
CometAPI를 통해 Kling 멀티모달 비디오 편집 작업을 생성합니다: POST /kling/v1/videos/multi-elements를 사용해 여러 요소를 결합하고 비동기로 비디오를 생성합니다.
전체 워크플로
편집 세션 초기화
session_id를 획득하세요.선택 영역 구성
최종 작업 제출
session_id, edit_mode, 최종 prompt, 그리고 필요한 선택적 생성 설정을 전송한 다음, 반환된 task id를 상태 확인용으로 저장하세요.호출 전에 확인할 사항
- 선택 세션이 이미 초기화되어 있는지 확인하세요
- 생성 호출 비용이 발생하기 전에 영역 선택이 올바른지 확인하세요
- 선택 관련 후속 호출은 반드시 동일한 계정과 초기화 시 반환된 정확한
session_id로 실행하세요 edit_mode를addition,swap, 또는removal로 설정하세요addition과swap에는image_list를 제공하고,removal에는image_list를 생략하세요duration은"5"또는"10"과 같은 문자열로 전송하세요. 예제에서는"5"를 명시적으로 전달합니다- 이 경로는 설정 단계가 아니라 최종 생성 단계로 취급하세요
- 편집 워크플로에 필요한 경우에만
image_list,negative_prompt,mode,duration,callback_url, 또는external_task_id를 추가하세요
인증
Bearer token authentication. Use your CometAPI key.
본문
Selection session id returned by init-selection. Follow-up calls must use the same account and exact session id.
Editing operation for the selected video region. Use addition to add an element, swap to replace a selected element, or removal to remove it.
addition, swap, removal Instruction describing the desired edit. Reference the source video as <<<video_1>>> and any reference image as <<<image_1>>>.
Kling model variant for the final edit task. Omit to use kling-v1-6.
kling-v1-6 Image references used by addition and swap tasks. Omit this field for removal tasks.
1Elements to avoid in the edited result.
Generation mode. Use std or pro.
std, pro Requested output duration in seconds.
Webhook URL to receive task status updates.
Custom task id for your own tracking. Must be unique per account.