메인 콘텐츠로 건너뛰기
POST
/
kling
/
v1
/
audio
/
video-to-audio
Create a Kling video-to-audio task
curl --request POST \
  --url https://api.cometapi.com/kling/v1/audio/video-to-audio \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "video_url": "https://xxxxx.mp4"
}
'
{
  "code": 123,
  "message": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "created_at": 123,
    "updated_at": 123
  }
}
이 엔드포인트를 사용해 소스 비디오에서 오디오 결과를 생성할 수 있습니다.

호출하기 전에

  • video_id 또는 video_url 중 하나만 보내고, 둘 다 보내지는 마세요
  • 소스 클립이 원래 Kling에서 생성된 것이 아니라면 video_url을 사용하세요
  • 통합에 필요하지 않다면 callback_urlexternal_task_id는 선택 사항으로 두세요

작업 흐름

1

소스 비디오 제출

Kling video_id 또는 접근 가능한 video_url 중 하나를 전송한 다음, 반환된 task id를 저장하세요.
2

작업 폴링

작업이 종료 상태에 도달할 때까지 Kling 오디오 쿼리 경로를 사용해 개별 조회로 계속 진행하세요.
3

출력 저장

안정적인 보관 또는 후속 처리가 필요하다면 최종 오디오 에셋을 저장하세요.
전체 파라미터 참조는 공식 Kling 문서를 확인하세요.

인증

Authorization
string
header
필수

Bearer token authentication. Use your CometAPI key.

본문

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

ID of a Kling-generated video. Only videos created within the last 30 days with a duration of 3–20 seconds are supported. Mutually exclusive with video_url — exactly one must be provided.

external_task_id
string
기본값:audio-video-task-001

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

callback_url
string
기본값:https://example.com/webhook

Webhook URL for task status notifications. The server sends a callback when the task status changes.

video_url
string
기본값:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4

Accessible URL of the source video. Accepted formats: MP4, MOV. Max 100 MB, 720p or 1080p resolution, duration 3–20 seconds. Mutually exclusive with video_id — exactly one must be provided.

응답

200 - application/json

Task accepted.

code
integer
필수

Error code; specific error code definition

message
string
필수

Error message

data
object
필수