A continuous five-second intimate portrait of the same elderly female tailor in her quiet workroom. Her hands remain gently resting on the folded fabric on the table. She slowly raises her gaze from the cloth toward someone just beside the camera and gives a small warm smile; her shoulders rise subtly with a breath. Preserve her age, face, glasses, hairstyle, fingers and clothing exactly. A curtain moves very slightly at the edge of the softly lit window. Fixed camera, natural expression and skin, no talking, no cuts.
Kling 1.6 Standard Image to Video API
kwaivgi/kling-video/v1.6/standard/image-to-videoKling 1.6 Standard Image to Video 将静态参考图像转化为流畅的 720p 视频,支持单图首帧驱动与多图 Elements 资产延续,提供 5 秒与 10 秒时长。它高度保留输入图像的人物相貌、主体轮廓与色彩风格,同时依据文字指令赋予真实的物理动作与平滑运镜。

体验上传支持 JPG、PNG、WebP,每个文件最多 10 MiB。可在 JSON 模式填写 HTTP(S) URL。
示例
REST API 规格
快速开始
提交端点请求并查询任务状态。请将示例素材 URL 替换为可访问的真实文件。
第一步:配置 API 鉴权
在控制台申请 API Key,并在每个 HTTP 请求头中携带 Authorization: Bearer <API_KEY> 进行身份验证。
- 任务提交端点
- POST
https://api.vidgo.ai/api/generate/submit - 鉴权请求头
- Authorization: Bearer VIDGO_API_KEY
第 2 步:提交生成任务
POST /api/generate/submit。model 和可选 callback_url 位于根级,生成参数位于 input 内。
REQUEST_BODY=$(cat <<'JSON'
{
"model": "kwaivgi/kling-video/v1.6/standard/image-to-video",
"input": {
"prompt": "A quiet forest in morning light, with a slow camera pan.",
"duration": 5,
"start_image_url": "https://example.com/start-frame.png"
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"第三步:轮询任务执行结果
使用 task_id 查询进度;not_started 或 running 时继续轮询,finished 或 failed 时停止。成功后读取 data.files[].file_url,失败时读取 data.error_message。
状态查询端点
GET https://api.vidgo.ai/api/generate/status/{task_id}使用 task_id 查询进度;not_started 或 running 时继续轮询,finished 或 failed 时停止。成功后读取 data.files[].file_url,失败时读取 data.error_message。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "task-example",
"status": "not_started",
"created_time": "2026-09-23T08:00:00"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}端到端完整脚本示例
展开查看在生产环境中具备轮询重试、异常保护和超时处理的完整自动化脚本。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "kwaivgi/kling-video/v1.6/standard/image-to-video",
"input": {
"prompt": "A quiet forest in morning light, with a slow camera pan.",
"duration": 5,
"start_image_url": "https://example.com/start-frame.png"
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done请求参数(input 对象)
向 /api/generate/submit 提交 POST 请求时,input 内部所支持的生成参数配置:
| 字段 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| prompt | string | 必填 | — | 必填非空字符串,去除首尾空白后最多 2,500 个 Unicode 字符。 |
| duration | integer | 必填 | — | 必填数值 5 或 10 秒;不接受字符串、布尔值或小数时长。API 无默认值,体验表单初始选择 5 秒。 |
| aspect_ratio | string | 可选 | — | 可选 1:1、16:9、9:16,无默认值。Standard 首帧图生不支持,仅 Elements 支持。 |
| negative_prompt | string | 可选 | — | 可选字符串,最多 2,500 个 Unicode 字符。 |
| cfg_scale | number | 可选 | — | 可选有限数值 0–1,无默认值;Elements 工作流不支持。 |
| start_image_url | string | 按工作流必填 | — | 首帧工作流必填 HTTP(S) 图片 URL;与 image_urls 互斥。 |
| image_urls | array | 按工作流必填 | — | Elements 工作流必填 1–4 个 HTTP(S) 参考图 URL;与首帧、尾帧及 cfg_scale 互斥。 |
响应字段(查询结果)
通过 GET /api/generate/status/{task_id} 轮询获取的任务详情:
| 字段 | 类型 | 描述 |
|---|---|---|
| code | integer | 业务响应状态码,200 表示成功。 |
| data.task_id | string | 异步任务全局唯一流水号。 |
| data.status | string | 任务执行阶段:not_started(排队中)、running(生成中)、finished(已完成)、failed(失败)。 |
| data.files | array | 生成成功时包含的成片文件列表,每项含 file_url 与 file_type。 |
| data.error_message | string | null | 任务执行异常时的具体错误描述。 |
任务生命周期
客户端应根据 status 字段判断任务进度,达到 finished 或 failed 终态时立即终止轮询:
not_started任务已接收,等待执行。
running正在生成。
finished生成完成,从 data.files 获取视频 URL。
failed生成失败,请查看 data.error_message,已扣积分按现有流程返还。
轮询与异常处理
- 轮询频次推荐建议初始轮询间隔设为 2–3 秒,随着任务持续可递增至 5 秒一次,避免过密请求。
- 网络波动与重试若查询网络出现 5xx 或连接超时,不代表任务失败,可稍作休眠后继续重试查询。
- 异步 Webhook 回调支持在提交请求体根层级传递 callback_url,在任务终态时系统将通过 POST 自动推送完整任务结果。
接口规格
| 规格项 | 取值 | 说明 |
|---|---|---|
| 模型 ID | kwaivgi/kling-video/v1.6/standard/image-to-video | 请求根级 model 字段。 |
| 时长 | 5 / 10s | 必填数值 5 或 10 秒;不接受字符串、布尔值或小数时长。API 无默认值,体验表单初始选择 5 秒。 |
Kling 1.6 Standard Image to Video API 常见问题
Kling 1.6 Standard Image to Video API 是什么?
Kling 1.6 Standard Image to Video 是快手(Kwaivgi)研发的图像生成视频模型。它能够根据用户输入的静态参考图像与提示词生成 720p 分辨率的连续动态视频,支持单图首帧驱动与 1–4 张图片的多图 Elements 一致性工作流。基于先进的多模态扩散架构,它在赋予画面真实自然物理动作与运镜的同时,高度保留原始图像的主体身份、构图美感与色彩风格。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
Kling 1.6 Standard Image to Video 支持哪些图片输入方式?
该端点提供两种输入模式:一是单图首帧模式,通过 start_image_url 传入首帧图片并赋予动态;二是 Elements 多图参考模式,通过 image_urls 数组传入 1 到 4 张参考图片以保持主体在视频中的外观一致性。两类图像字段互斥,不可在单次请求中同时混用。
Kling 1.6 Standard Image to Video 支持指定画面宽高比吗?
使用 start_image_url 首帧动画模式时,输出视频会自动继承首帧图片的宽高比,不支持显式设置 aspect_ratio;若切换为 image_urls Elements 多图参考模式,则支持自由指定 16:9、9:16 或 1:1 画幅。
Kling 1.6 Standard Image to Video 支持尾帧控制吗?
不支持。Standard 系列端点仅支持通过 start_image_url 指定起始首帧;如需同时指定起始首帧与结束尾帧进行闭环过渡,请选用 Kling 1.6 Pro Image to Video 端点。
Kling 1.6 Standard Image to Video 的 Elements 工作流有什么优势?
Elements 工作流允许上传 1 到 4 张多角度参考图(例如正面、侧面和特写)。模型通过综合多张图片的特征表征,在较长动作或运镜转移中能够大幅减少主体变形走样,维持角色与道具的高度一致。
Kling 1.6 Standard Image to Video 如何计费?
端点按秒计费,费率为 9 积分/秒(相当于 $0.045/秒)。单图首帧与多图 Elements 模式收费相同:5 秒视频消耗 45 积分($0.225),10 秒视频消耗 90 积分($0.450),任务生成失败自动退还积分。
上传的参考图片有什么格式与大小要求?
体验区上传支持 JPG、PNG 和 WebP 格式,单个图片文件大小不得超过 10 MiB;在 API 调用中须传入公网可访问、带合法协议主机的 HTTP(S) 图片直链。