メインコンテンツへスキップ
POST
/
kling
/
v1
/
videos
/
video-extend
Video Extension
curl --request POST \
  --url https://api.cometapi.com/kling/v1/videos/video-extend \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "video_id": "example"
}
'
{
  "code": 123,
  "message": "<string>",
  "request_id": "<string>",
  "data": {
    "task_id": "<string>",
    "task_status": "<string>",
    "task_status_msg": "<string>",
    "task_info": {
      "parent_video": {
        "id": "<string>",
        "url": "<string>",
        "duration": "<string>"
      }
    },
    "task_result": {
      "videos": [
        {
          "id": "<string>",
          "url": "<string>",
          "duration": "<string>"
        }
      ]
    },
    "created_at": 123,
    "updated_at": 123
  }
}
このエンドポイントを使用すると、既存の Kling 動画を後続タスクとして延長できます。

呼び出す前に

  • 完了済みの Kling 動画結果から開始します
  • 親タスクの結果から video_id を渡します
  • 親タスクと同じアカウントコンテキストで延長を実行します
  • 親タスクのリソースが期限切れになる前に、速やかに延長を開始します

タスクフロー

1

親動画タスクを完了する

元の Kling 動画を作成し、その結果が利用可能になるまで待機します。
2

延長リクエストを送信する

video_id と必要に応じてプロンプトを送信し、返された task id を保存します。
3

延長タスクをポーリングする

延長された動画が終了状態に達するまで、個別クエリ を使用して継続的に確認します。
完全なパラメータリファレンスについては、Kling 公式ドキュメント を参照してください。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ボディ

application/json
video_id
string
デフォルト:example
必須

Video id from a previously generated Kling video task to extend.

prompt
string

Text prompt describing the desired motion for the extended segment. Maximum 500 characters.

callback_url
string

Webhook URL to receive task status updates when the task completes.

レスポンス

200 - application/json

Successful Response

code
integer
必須

Error code; specifically define the error code

message
string
必須

error message

request_id
string
必須

Request ID, system-generated, for tracking requests, troubleshooting issues

data
object
必須