Naar hoofdinhoud gaan
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
  }
}
Gebruik dit endpoint om een audioresultaat te genereren uit een bronvideo.

Voordat je het aanroept

  • Verstuur ofwel video_id of video_url, maar niet allebei
  • Gebruik video_url wanneer de bronclip oorspronkelijk niet van Kling afkomstig is
  • Houd callback_url en external_task_id optioneel, tenzij je integratie ze nodig heeft

Taakverloop

1

Dien de bronvideo in

Verstuur ofwel de Kling-video_id of een toegankelijke video_url, en sla vervolgens de geretourneerde task id op.
2

Poll de taak

Ga verder met Individuele query’s via het Kling-audioquerypad totdat de taak een eindstatus bereikt.
3

Sla de output op

Sla het uiteindelijke audio-item op als je stabiele bewaring of downstream-verwerking nodig hebt.
Zie voor de volledige parameterreferentie de officiële Kling-documentatie.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Body

application/json
video_id
string
standaard:861034216165875784
vereist

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
standaard: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
standaard:https://example.com/webhook

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

video_url
string
standaard: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.

Respons

200 - application/json

Task accepted.

code
integer
vereist

Error code; specific error code definition

message
string
vereist

Error message

data
object
vereist