SunoHub
  1. Kling API
SunoHub
  • SunoHub接口文档
    • Suno API
      • 歌曲生成接口
      • 歌词生成接口
      • 歌曲任务查询接口
      • 获取歌曲Timing接口
      • MP4生成接口
      • 自定义上传歌曲
      • 获取Wav接口
      • 创建Persona接口
      • 增强风格描述接口
    • Kling API
      • 视频生成接口
        POST
  1. Kling API

视频生成接口

开发中
正式环境(默认全球加速)
https://api.sunohub.cn
正式环境(默认全球加速)
https://api.sunohub.cn
POST
https://api.sunohub.cn
/kling/videos
最后修改时间:2025-07-01 15:31:28

请求参数

Header 参数
Authorization
string 
用户的使用凭证
可选
默认值:
Bearer {{API_TOKEN}}
Body 参数application/json
action
string 
必需
包含了图生视频以及文生视频俩种。
示例值:
text2videoimage2video
model
string 
生成视频采用的模型
必需
示例值:
kling-v1kling-v1-6kling-v1-5kling-v2-1kling-v2kling-v2-1-masterkling-v2-master
prompt
string 
生成视频的提示词
必需
start_image_url
string 
生成视频的首帧图片
必需
end_image_url
string 
生成视频的尾帧图片
必需
cfg_scale
string 
必需
mode
string 
生成视频的模式
必需
aspect_ratio
string 
生成视频的尺寸
必需
duration
integer 
生成视频的时长
必需
默认值:
5
示例值:
510
is_audio
string 
是否包含声音
必需
示例
{
  "action": "text2video",
  "model": "kling-v1",
  "prompt": "White ceramic coffee mug on glossy marble countertop with morning window light. Camera slowly rotates 360 degrees around the mug, pausing briefly at the handle.",
  "start_image_url": "dasda",
  "end_image_url": "dasda",
  "cfg_scale": "2",
  "mode": "std",
  "aspect_ratio": "16:9",
  "duration": 5
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.sunohub.cn/kling/videos' \
--header 'Authorization: Bearer asdasdasda9998fads' \
--header 'Content-Type: application/json' \
--data-raw '{
  "action": "text2video",
  "model": "kling-v1",
  "prompt": "White ceramic coffee mug on glossy marble countertop with morning window light. Camera slowly rotates 360 degrees around the mug, pausing briefly at the handle.",
  "start_image_url": "dasda",
  "end_image_url": "dasda",
  "cfg_scale": "2",
  "mode": "std",
  "aspect_ratio": "16:9",
  "duration": 5
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2025-07-01 15:31:28
上一页
增强风格描述接口
Built with