POST
/kling/v1/videos/image2video图生视频
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/kling/v1/videos/image2video \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-v1",
"image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"image_tail": "",
"prompt": "",
"negative_prompt": "",
// "voice_list": [
// {
// "voiceId": ""
// }
// ],
// "sound": "",
"cfg_scale": 0.5,
"mode": "std",
"static_mask": "",
"dynamic_masks": [
{
"mask": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"trajectories": [
{
"x": 0,
"y": 0
},
{
"x": 1,
"y": 1
}
],
}
],
// "camera_control": {
// "type": "simple",
// "config": {
// "horizontal": 1.0,
// "vertical": 0,
// "pan": 0,
// "tilt": 0,
// "roll": 0,
// "zoom": 0
// }
// },
"duration": 5,
"callback_url": "",
"external_task_id": ""
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Content-Type | Header | string | 否 | - | application/json |
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
model_name | JSON body | string | 是 | 模型名称 枚举值:kling-v1, kling-v1-5, kling-v1-6, kling-v2-master, kling-v2-1, kling-v2-1-master, kling-v2-5-turbo,kling-v2-6,kling-v3 | - |
image | JSON body | string | 是 | 参考图像 支持传入图片Base64编码或图片URL(确保可访问) | - |
image_tail | JSON body | string | 否 | 参考图像 - 尾帧控制 支持传入图片Base64编码或图片URL(确保可访问) | - |
prompt | JSON body | string | 否 | 正向文本提示词不能超过2500个字符 用<<<voice_1>>>来指定音色,序号同voice_list参数所引用音色的排列顺序 一次视频生成任务至多引用2个音色;指定音色时,sound参数值必须为on语法结构越简单越好, 如:男人<<<vocie_1>>>说:“你好” 当voice_list参数不为空且prompt参数中引用音色ID时,视频生成任务按“有指定音色”计量计费 | - |
negative_prompt | JSON body | string | 否 | 负向文本提示词 | - |
voice_list | JSON body | array<object> | 否 | 仅V2.6及后续版本模型支持当前参数生成视频时所引用的音色的列表 一次视频生成任务至多引用2个音色 当voice_list参数不为空且prompt参数中引用音色ID时,视频生成任务按“有指定音色”计量计费 | - |
voice_list[].voice_id | JSON body | string | 否 | - | - |
sound | JSON body | string | 否 | 仅V2.6及后续版本模型支持当前参数生成视频时是否同时生成声音 枚举值:on,off | - |
cfg_scale | JSON body | number | 否 | kling-v2.x模型不支持当前参数生成视频的自由度;值越大,模型自由度越小,与用户输入的提示词相关性越强 | - |
mode | JSON body | string | 是 | 生成视频的模式 枚举值:std,pro 其中std:标准模式(标准),基础模式,性价比高 其中pro:专家模式(高品质),高表现模式,生成视频质量更佳 | - |
static_mask | JSON body | string | 否 | 静态笔刷涂抹区域(用户通过运动笔刷涂抹的 mask 图片) | - |
multi_shot | JSON body | boolean | 否 | 是否生成多镜头视频 当前参数为true时,prompt参数无效 当前参数为false时,shot_type参数及multi_prompt参数无效 | - |
shot_type | JSON body | string | 否 | 分镜方式 枚举值:customize 当multi_shot参数为true时,当前参数必填 | - |
multi_prompt | JSON body | array<object> | 否 | 各分镜信息,如提示词、时长等 ● 通过index、prompt、duration参数定义分镜序号及相应提示词和时长,其中: ○ 最多支持6个分镜,最小支持1个分镜 ○ 每个分镜相关内容的最大长度不超过512 ○ 每个分镜的时长不大于当前任务的总时长,不小于1 ○ 所有分镜的时长之和等于当前任务的总时长 | - |
multi_prompt[].index | JSON body | integer | 是 | - | - |
multi_prompt[].prompt | JSON body | string | 是 | - | - |
multi_prompt[].duration | JSON body | string | 是 | - | - |
dynamic_masks | JSON body | array<object> | 否 | 动态笔刷配置列表 | - |
dynamic_masks[].mask | JSON body | string | 否 | - | - |
dynamic_masks[].trajectories | JSON body | array<object> | 否 | - | - |
dynamic_masks[].trajectories[].x | JSON body | integer | 是 | - | - |
dynamic_masks[].trajectories[].y | JSON body | integer | 是 | - | - |
camera_control | JSON body | object | 否 | 控制摄像机运动的协议(如未指定,模型将根据输入的文本/图片进行智能匹配) | - |
camera_control.type | JSON body | string | 是 | - | - |
camera_control.config | JSON body | object | 是 | - | - |
camera_control.config.horizontal | JSON body | integer | 是 | - | - |
camera_control.config.vertical | JSON body | integer | 是 | - | - |
camera_control.config.pan | JSON body | integer | 是 | - | - |
camera_control.config.tilt | JSON body | integer | 是 | - | - |
camera_control.config.roll | JSON body | integer | 是 | - | - |
camera_control.config.zoom | JSON body | integer | 是 | - | - |
duration | JSON body | string | 是 | 生成视频时长,单位s 枚举值:5,10 | - |
watermark_info | JSON body | object | 否 | 是否同时生成含水印的结果 ● 通过enabled参数定义,用key:value承载,如下:: "watermark_info": { "enabled": boolean // true 为生成,false 为不生成 } | - |
watermark_info.enabled | JSON body | boolean | 是 | - | - |
callback_url | JSON body | string | 否 | - | - |
external_task_id | JSON body | string | 否 | - | - |
返回响应 (200)
此部分没有定义参数。
来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899784,
"name": "图生视频",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/kling/v1/videos/image2video",
"tags": [],
"status": 1,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"model_name": {
"type": "string",
"description": "模型名称 枚举值:kling-v1, kling-v1-5, kling-v1-6, kling-v2-master, kling-v2-1, kling-v2-1-master, kling-v2-5-turbo,kling-v2-6,kling-v3"
},
"image": {
"type": "string",
"description": "参考图像 支持传入图片Base64编码或图片URL(确保可访问)"
},
"image_tail": {
"type": "string",
"description": "参考图像 - 尾帧控制 支持传入图片Base64编码或图片URL(确保可访问)"
},
"prompt": {
"type": "string",
"description": "正向文本提示词不能超过2500个字符\n用<<<voice_1>>>来指定音色,序号同voice_list参数所引用音色的排列顺序\n一次视频生成任务至多引用2个音色;指定音色时,sound参数值必须为on语法结构越简单越好,\n如:男人<<<vocie_1>>>说:“你好”\n当voice_list参数不为空且prompt参数中引用音色ID时,视频生成任务按“有指定音色”计量计费"
},
"negative_prompt": {
"type": "string",
"description": "负向文本提示词"
},
"voice_list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"voice_id": {
"type": "string"
}
},
"x-apifox-orders": [
"voice_id"
]
},
"description": "仅V2.6及后续版本模型支持当前参数生成视频时所引用的音色的列表\n一次视频生成任务至多引用2个音色\n当voice_list参数不为空且prompt参数中引用音色ID时,视频生成任务按“有指定音色”计量计费"
},
"sound": {
"type": "string",
"description": "仅V2.6及后续版本模型支持当前参数生成视频时是否同时生成声音\n枚举值:on,off"
},
"cfg_scale": {
"type": "number",
"description": "kling-v2.x模型不支持当前参数生成视频的自由度;值越大,模型自由度越小,与用户输入的提示词相关性越强"
},
"mode": {
"type": "string",
"description": "生成视频的模式\n枚举值:std,pro\n其中std:标准模式(标准),基础模式,性价比高\n其中pro:专家模式(高品质),高表现模式,生成视频质量更佳"
},
"static_mask": {
"type": "string",
"description": "静态笔刷涂抹区域(用户通过运动笔刷涂抹的 mask 图片)"
},
"multi_shot": {
"type": "boolean",
"description": "是否生成多镜头视频\n当前参数为true时,prompt参数无效\n当前参数为false时,shot_type参数及multi_prompt参数无效"
},
"shot_type": {
"type": "string",
"description": "分镜方式\n枚举值:customize\n当multi_shot参数为true时,当前参数必填"
},
"multi_prompt": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"prompt": {
"type": "string"
},
"duration": {
"type": "string"
}
},
"required": [
"index",
"prompt",
"duration"
],
"x-apifox-orders": [
"index",
"prompt",
"duration"
]
},
"description": "各分镜信息,如提示词、时长等\n● 通过index、prompt、duration参数定义分镜序号及相应提示词和时长,其中:\n\t○ 最多支持6个分镜,最小支持1个分镜\n\t○ 每个分镜相关内容的最大长度不超过512\n\t○ 每个分镜的时长不大于当前任务的总时长,不小于1\n\t○ 所有分镜的时长之和等于当前任务的总时长"
},
"dynamic_masks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mask": {
"type": "string"
},
"trajectories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"x": {
"type": "integer"
},
"y": {
"type": "integer"
}
},
"required": [
"x",
"y"
],
"x-apifox-orders": [
"x",
"y"
]
}
}
},
"x-apifox-orders": [
"mask",
"trajectories"
]
},
"description": "动态笔刷配置列表"
},
"camera_control": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"horizontal": {
"type": "integer"
},
"vertical": {
"type": "integer"
},
"pan": {
"type": "integer"
},
"tilt": {
"type": "integer"
},
"roll": {
"type": "integer"
},
"zoom": {
"type": "integer"
}
},
"required": [
"horizontal",
"vertical",
"pan",
"tilt",
"roll",
"zoom"
],
"x-apifox-orders": [
"horizontal",
"vertical",
"pan",
"tilt",
"roll",
"zoom"
]
}
},
"required": [
"type",
"config"
],
"x-apifox-orders": [
"type",
"config"
],
"description": "控制摄像机运动的协议(如未指定,模型将根据输入的文本/图片进行智能匹配)"
},
"duration": {
"type": "string",
"description": "生成视频时长,单位s\n枚举值:5,10"
},
"watermark_info": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": [
"enabled"
],
"x-apifox-orders": [
"enabled"
],
"description": "是否同时生成含水印的结果\n● 通过enabled参数定义,用key:value承载,如下::\n\"watermark_info\": {\n \t\"enabled\": boolean // true 为生成,false 为不生成\n}"
},
"callback_url": {
"type": "string"
},
"external_task_id": {
"type": "string"
}
},
"required": [
"model_name",
"duration",
"image",
"mode"
],
"x-apifox-orders": [
"model_name",
"image",
"image_tail",
"prompt",
"negative_prompt",
"voice_list",
"sound",
"cfg_scale",
"mode",
"static_mask",
"multi_shot",
"shot_type",
"multi_prompt",
"dynamic_masks",
"camera_control",
"duration",
"watermark_info",
"callback_url",
"external_task_id"
]
},
"examples": [
{
"mediaType": "application/json",
"value": "{\r\n \"model_name\": \"kling-v1\",\r\n \"image\": \"https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg\",\r\n \"image_tail\": \"\",\r\n \"prompt\": \"\",\r\n \"negative_prompt\": \"\",\r\n // \"voice_list\": [\r\n // {\r\n // \"voiceId\": \"\"\r\n // }\r\n // ],\r\n // \"sound\": \"\",\r\n \"cfg_scale\": 0.5,\r\n \"mode\": \"std\",\r\n \"static_mask\": \"\",\r\n \"dynamic_masks\": [\r\n {\r\n \"mask\": \"https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg\",\r\n \"trajectories\": [\r\n {\r\n \"x\": 0,\r\n \"y\": 0\r\n },\r\n {\r\n \"x\": 1,\r\n \"y\": 1\r\n }\r\n ],\r\n }\r\n ],\r\n // \"camera_control\": {\r\n // \"type\": \"simple\",\r\n // \"config\": {\r\n // \"horizontal\": 1.0,\r\n // \"vertical\": 0,\r\n // \"pan\": 0,\r\n // \"tilt\": 0,\r\n // \"roll\": 0,\r\n // \"zoom\": 0\r\n // }\r\n // },\r\n \"duration\": 5,\r\n \"callback_url\": \"\",\r\n \"external_task_id\": \"\"\r\n}"
}
],
"mediaType": "",
"oasExtensions": "",
"required": true,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "3tYQJEll7U",
"name": "Content-Type",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
},
{
"id": "MTunJbdcIi",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {
"type": "inherit",
"inherit": {}
},
"responses": [
{
"id": 177153343,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {},
"x-apifox-orders": []
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": []
}
],
"responseExamples": [],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436140,
"ordering": 0,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {}
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-02T03:53:34.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}