API reference
🇺🇸 English
  • 🇨🇳 Chinese
  • 🇺🇸 English
  1. Kling-API
API reference
🇺🇸 English
  • 🇨🇳 Chinese
  • 🇺🇸 English
  • Chat Models
    • Chat
      • Create chat completion
      • vision
    • OpenAI-Realtime
    • Completions
      • Instruct
    • Audio
      • Transcriptions
      • Translations
      • Speech
    • Image generation
      • DALL·E 3
    • Embeddings
      • Create
    • Models
      • model list
    • Help
      • 常见问题及解决办法
  • Anthropic
    • Anthropic Claude
  • Suno
    • Generate music
    • Generate lyrics
    • Upload music
    • Music concat
    • Fetch task
    • Fetch batch tasks
  • Udio
    • Generate music
    • Fetch task
  • Midjourney API
    • Quick
    • Task Submit
      • Imagine
      • Action
      • Modal
      • Blend
      • Describe
      • Shorten
      • Upload discord
    • Get Task
      • Fetch task by ids
      • Fetch task by id
      • Get seed
  • Flux
    • Official
      • Generate
      • Finetune
      • Fetch task
    • OpenAI Dalle3
  • Recraft
    • Official
      • Generate Image
      • Vectorize Image
      • Remove Background
      • Clarity Upscale
      • Generative Upscale
      • Create style
    • OpenAI Dalle3
  • Ideogram
    • Generate
    • Remix
    • Edit
    • Upscale
    • Describe
  • Luma
    • Official
      • Generate
      • Fetch task
    • Own format
      • Submit
        • Generate
        • Get video of no mark
        • 扩展视频
      • Get task
        • Get task
        • Get batch task
  • Runway
    • Official
      • image to video
      • get task
    • reverse
      • text to video
      • image to video
      • video2video
      • Act-one
      • Get task
  • Kling-API
    • Callback
    • Generate image
      POST
    • Text 2 Video
      POST
    • Image 2 Video
      POST
    • Video extend
      POST
    • Get task
      GET
    • lip-sync
      POST
    • kolors-virtual-try-on
      POST
  • Replicate
    • Generate
    • Get
  • MiniMax
    • Generate video
    • Get task
    • Get file
  1. Kling-API

Image 2 Video

POST
/kling/v1/videos/image2video
最后修改时间:2025-05-14 09:05:18
This document is not updated in real time. Please refer to the official document for the complete version:
https://docs.qingque.cn/d/home/eZQClW07IFEuX1csc-VejdY2M

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数
Authorization
string 
可选
默认值:
{{YOUR_API_KEY}}
Body 参数application/json
model_name
string 
可选
默认值:
kling-v1
示例值:
kling-v1kling-v1-5kling-v1-6
image
string 
必需
参考图像,必须,支持Base64编码或图片URL,支持.jpg / .jpeg / .png格式,大小不能超过10MB,分辨率不小于300*300px
image_tail
string 
可选
参考图像 - 尾帧控制,可选,支持Base64编码或图片URL,支持.jpg / .jpeg / .png格式,大小不能超过10MB,分辨率不小于300*300px
prompt
string 
可选
正向文本提示, 可选,不能超过500个字符
negative_prompt
string 
可选
负向文本提示,可选,不能超过200个字符
cfg_scale
number 
可选
生成视频的自由度,可选,值越大相关性越强,取值范围:[0, 1]
mode
string 
可选
生成视频的模式,可选,枚举值:std(高性能)或 pro(高表现)
duration
string 
可选
生成视频时长,单位秒,可选,枚举值:5,10(包含尾帧的请求仅支持5秒)
callback_url
string 
可选
本次任务结果回调通知地址,可选
示例
{
  "model_name": "kling-v1",
  "mode": "std",
  "prompt": "Animate this image, bringing it to life with subtle movements while preserving the original features.",
  "cfg_scale": 0.7,
  "aspect_ratio": "16:9"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/kling/v1/videos/image2video' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model_name": "kling-v1",
  "mode": "std",
  "prompt": "Animate this image, bringing it to life with subtle movements while preserving the original features.",
  "cfg_scale": 0.7,
  "aspect_ratio": "16:9"
}'

返回响应

🟢200成功
application/json
Body
code
integer 
必需
错误码;具体定义错误码
message
string 
错误信息
必需
request_id
string 
必需
请求ID,系统生成,用于跟踪请求、排查问题
data
object 
必需
task_id
string 
任务ID,系统生成
必需
task_status
string 
必需
任务状态,枚举值:submitted(已提交)、processing(处理中)、succeed(成功)、failed(失败)
created_at
integer 
必需
任务创建时间,Unix时间戳、单位ms
updated_at
integer 
必需
任务更新时间,Unix时间戳、单位ms
示例
{
    "code": 0,
    "message": "string",
    "request_id": "string",
    "data": {
        "task_id": "string",
        "task_status": "string",
        "created_at": 0,
        "updated_at": 0
    }
}
上一页
Text 2 Video
下一页
Video extend
Built with