支持图片、视频等多种输入源,结合文本提示进行视频编辑和生成。支持 kling-video-o1(3-10s)和 kling-v3-omni(3-15s)模型。Prompt 中可用 <<|<element_N>|>> 语法引用主体。
Authorization: Bearer ********************{
"model_name": "kling-video-o1",
"prompt": "将视频中的背景替换为海边日落场景",
"image_list": [
{
"image_url": "https://example.com/ref_image.jpg",
"type": "reference"
}
],
"video_list": [
{
"video_url": "https://example.com/source.mp4",
"refer_type": "source",
"keep_original_sound": true
}
],
"mode": "pro",
"duration": "10",
"aspect_ratio": "16:9"
}curl --location '/kling/v1/videos/omni-video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model_name": "kling-video-o1",
"prompt": "将视频中的背景替换为海边日落场景",
"image_list": [
{
"image_url": "https://example.com/ref_image.jpg",
"type": "reference"
}
],
"video_list": [
{
"video_url": "https://example.com/source.mp4",
"refer_type": "source",
"keep_original_sound": true
}
],
"mode": "pro",
"duration": "10",
"aspect_ratio": "16:9"
}'{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "string",
"task_status": "submitted",
"created_at": 0,
"updated_at": 0
}
}