Skip to main content
POST
cURL
使用此端點將現有的 Kling 影片延長為後續任務。

呼叫前準備

  • 從已完成的 Kling 影片結果開始
  • 傳入父任務結果中的 video_id
  • 將父 task_idvideo_id 一併傳入
  • 使用與延長相容的來源影片;不支援的來源影片會回傳 HTTP 400,而不是建立延長任務
  • 已完成的 5 秒 Kling v1 或 v1-6 文生影片或圖生影片父任務,是較安全的延長相容性起點
  • 僅在需要引導續接內容時才加入 promptnegative_promptcfg_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
必填