跳转到主要内容
POST
/
generate
/
k
/
kling26-image-to-video
Kling 2.6 图生视频
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/kling26-image-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image_urls": [
    "https://example.com/input.jpg"
  ],
  "prompt": "The person in the image starts to smile and wave",
  "duration": 5,
  "sound": false
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
使用快手的 Kling 2.6 模型从图片生成视频。 模型特点:
  • 图片驱动 - 基于输入图片生成连贯动态视频
  • 超长视频 - 支持生成 5 秒或 10 秒高质量视频
  • 音频生成 - 可选生成配套音效,增强视频表现力
  • 高清画质 - 输出流畅自然的高清视频内容

Authorizations

Authorization
string
header
required

请使用您的 API Token 进行认证

Body

application/json

Task parameters

image_urls
string[]
required

输入图片 URL(必填)

Required array length: 1 element
Example:
["https://example.com/input.jpg"]
prompt
string
required

提示词(必填,最大1000字符)

Required string length: 1 - 1000
Example:

"The person in the image starts to smile and wave"

duration
enum<integer>
default:5

视频时长(可选,5或10秒,默认5)

可用选项:
5,
10
Example:

5

sound
boolean
default:false

是否包含声音(可选,默认 false)

Example:

false

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"