Skip to main content
POST
cURL
このエンドポイントを使用すると、既存の Kling 動画を後続タスクとして延長できます。

呼び出し前の確認事項

  • 完了済みの Kling 動画結果を起点にします
  • 親タスクの結果から video_id を渡します
  • 親の task_idvideo_id とあわせて渡します
  • 延長に対応したソース動画を使用してください。対応していないソース動画では延長タスクは作成されず、代わりに HTTP 400 が返されます
  • 延長互換性の観点では、完了済みの 5 秒の Kling v1 または v1-6 の text-to-video または image-to-video 親タスクを起点にするほうが安全です
  • 続きの内容を調整する必要がある場合にのみ、promptnegative_prompt、または cfg_scale を追加します
  • 親タスクと同じアカウントコンテキストで延長を実行します
  • 親タスクのリソースが期限切れになる前に、速やかに延長を開始してください

タスクフロー

1

親動画タスクを完了する

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

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

親の task_idvideo_id、および必要に応じて prompt を送信し、返された task id を保存します。
3

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

延長された動画が終端状態になるまで、Kling タスクを取得する を続けて実行します。
完全なパラメータリファレンスについては、Kling の公式ドキュメント を参照してください。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ボディ

application/json
task_id
string
必須

Parent Kling task id for the extension-compatible video being extended.

video_id
string
必須

Video id from a parent task result. The source video must be extension-compatible; unsupported videos return HTTP 400.

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.

negative_prompt
string

Elements to avoid in the extension.

cfg_scale
number

Prompt adherence strength for the extension. Range: 0-1.

レスポンス

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
必須