Documentation

图生视频

Last updated: Nov 4, 2026

POST
/v3/aigc/kl/videos/image2video

根据首帧 / 尾帧图片生成视频,支持多镜头、主体和指定音色。

请求头带 X-Response-Format: orion 时按原厂报文返回,任务通过原生查询接口查询;否则返回统一结构。

使用 TE 北京地域 API Key 鉴权。模型能力、调用约定见 Kling 接口概览。

Authorization

BearerAuth
headerAuthorizationBearer <token>

TE 北京地域 API Key,填写后自动添加 Bearer 前缀。

Header Parameters

X-Response-Format?string

传 orion 时按原厂报文返回

Request Body

application/json
  1. body
model_name?string

kling-v3

image?string

首帧图,URL 或 Base64(不带 data: 前缀);jpg/jpeg/png,≤ 10MB,宽高 ≥ 300px,宽高比 1:2.5~2.5:1;与 image_tail 至少传一个

image_tail?string

尾帧图,URL 或 Base64(不带 data: 前缀);jpg/jpeg/png,≤ 10MB,宽高 ≥ 300px,宽高比 1:2.5~2.5:1

prompt?string

≤ 2500 字符;multi_shot 为 false 或 shot_type 为 intelligence 时必填

multi_shot?boolean

是否多镜头,默认 false;true 时 prompt 无效

shot_type?string

分镜方式,multi_shot 为 true 时必填

multi_prompt?array<>

分镜 [{index, prompt, duration}],1~6 个,单个 ≤ 512 字符,时长之和等于总时长

negative_prompt?string

≤ 2500 字符

element_list?array<>

主体 [{element_id}],最多 3 个;与 voice_list 互斥

voice_list?array<>

音色 [{voice_id}],最多 2 个;按“有指定音色”计费

sound?string

on / off(默认);仅 V2.6 及后续模型

cfg_scale?number

[0,1],默认 0.5;kling-v2.x 不支持

mode?string

std(标准)、pro(高品质)、4k(同 pro,输出 4K),默认 std

duration?string

3~15,默认 5;范围见能力地图

watermark_info?

{"enabled": true} 同时生成含水印结果;不支持自定义水印

Response Body

成功;具体状态及结果见响应字段。

application/json
  1. response
taskId?string

任务 ID

requestId?string

请求 ID,用于排查

code?string

错误码,异常时返回

message?string

错误信息,异常时返回

Example Request
curl -X POST 'https://vod.bj.baidubce.com/v3/aigc/kl/videos/image2video' \  -H 'X-Response-Format: orion' \  -H 'Content-Type: application/json' \  -d '{  "model_name": "kling-v3",  "image": "https://example.com/first.png",  "image_tail": "https://example.com/last.png",  "prompt": "<<<element_1>>> 的男士说,今天天气不错,然后逐渐走到<<<image_1>>>面前",  "element_list": [    {      "element_id": "xxx"    }  ],  "duration": "5",  "mode": "pro",  "sound": "on",  "watermark_info": {    "enabled": true  }}'
Example Response200
{  "taskId": "tsk-xxxxxxxxxxxxxxxx",  "requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}