メインコンテンツへスキップ
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 のいずれかを送信し、返されたタスク ID を保存します。
2

タスクをポーリング

タスクが終了状態に達するまで、Kling の音声クエリパスを使用して Individual Queries を続けてください。
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
必須