Kling
延长一个 Kling 视频
通过 POST /kling/v1/videos/video-extend 使用 task_id 和 video_id 延长 Kling 生成的视频;作为父账户下的子任务运行。
POST
cURL
使用此端点可将现有的 Kling 视频作为后续任务进行延长。
调用前准备
- 从一个已完成的 Kling 视频结果开始
- 传入父任务结果中的
video_id - 将父
task_id与video_id一起传入 - 使用与延长兼容的源视频;不受支持的源视频会返回 HTTP 400,而不是创建延长任务
- 已完成的 5 秒 Kling v1 或 v1-6 文生视频或图生视频父任务,是更稳妥的延长兼容性起点
- 仅在需要引导续写内容时添加
prompt、negative_prompt或cfg_scale - 在与父任务相同的账户上下文中运行延长任务
- 在父任务资源过期前尽快触发延长
任务流程
1
完成父视频任务
创建原始 Kling 视频,并等待其结果可用。
2
提交延长请求
发送父
task_id、video_id 和可选 prompt,然后保存返回的任务 id。3
轮询延长任务
继续使用获取一个 Kling 任务,直到延长后的视频达到终态。
授权
Bearer token authentication. Use your CometAPI key.
请求体
application/json
Parent Kling task id for the extension-compatible video being extended.
Video id from a parent task result. The source video must be extension-compatible; unsupported videos return HTTP 400.
Text prompt describing the desired motion for the extended segment. Maximum 500 characters.
Webhook URL to receive task status updates when the task completes.
Elements to avoid in the extension.
Prompt adherence strength for the extension. Range: 0-1.