AI model interfaceVideosFlexible format
Kling Image to Video
Generate video from images using the Kling model.
Supports passing image URL or Base64 encoded image data via the image parameter.
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
model_name?string
可灵模型名称;也兼容传入 model
image*string
首帧图片 URL 或 Base64
image_tail?string
尾帧图片 URL 或 Base64
prompt?string
文本提示词
negative_prompt?string
负向提示词
cfg_scale?number
提示词相关性
mode?string
生成模式
camera_control?
static_mask?string
静态遮罩图片
dynamic_masks?
动态遮罩参数
aspect_ratio?string
视频画幅比例
duration?string
视频时长(秒)
callback_url?string
任务回调地址
external_task_id?string
外部任务 ID
Response Body
application/json
application/json
curl -X POST "https://nodekey.xinghanyun.cn/kling/v1/videos/image2video" \ -H "Content-Type: application/json" \ -d '{ "model_name": "kling-v2-master", "image": "https://example.com/image.jpg", "image_tail": "https://example.com/tail-image.jpg", "prompt": "人物转身走开", "negative_prompt": "blurry, low quality", "cfg_scale": 0.5, "mode": "std", "camera_control": { "type": "simple", "config": { "horizontal": 2.5, "vertical": 0, "pan": 0, "tilt": 0, "roll": 0, "zoom": 0 } }, "static_mask": "https://example.com/static-mask.png", "dynamic_masks": [ { "trajectories": [ { "x": 1, "y": 1 } ] } ], "aspect_ratio": "16:9", "duration": "5", "callback_url": "https://your.domain/callback", "external_task_id": "custom-task-002" }'{
"task_id": "abcd1234efgh",
"status": "queued"
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}Last updated on