kling-video
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseKling Video Generation
Kling视频生成
Generate AI videos through AceDataCloud's Kuaishou Kling API.
Setup: See authentication for token setup.
通过AceDataCloud的快手Kling API生成AI视频。
设置: 查看身份验证了解令牌设置方法。
Quick Start
快速开始
bash
curl -X POST https://api.acedata.cloud/kling/videos \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "text2video", "prompt": "a cat playing piano on a rooftop at sunset", "model": "kling-v3", "mode": "std", "duration": 5}'Async: See async task polling. Poll viawithPOST /kling/tasks.{"id": "..."}
bash
curl -X POST https://api.acedata.cloud/kling/videos \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "text2video", "prompt": "a cat playing piano on a rooftop at sunset", "model": "kling-v3", "mode": "std", "duration": 5}'异步处理: 查看异步任务轮询。通过接口并传入POST /kling/tasks进行轮询。{"id": "..."}
Models
模型
| Model | Quality | Best For |
|---|---|---|
| Latest | Best quality, flexible 3–15s duration, optional audio generation |
| Latest | Omni model with audio support, flexible 3–15s duration |
| High | High-quality output with optional audio (pro mode) |
| High + Fast | Best speed/quality trade-off |
| High | High-quality output |
| High | Improved v2 |
| Improved | Better quality than v1 |
| Standard | Basic generation, lowest cost |
| Premium | Highest quality (thinking model) |
| 模型 | 画质 | 适用场景 |
|---|---|---|
| 最新版本 | 最佳画质,支持3–15秒灵活时长,可选音频生成 |
| 最新版本 | 支持音频的全能模型,支持3–15秒灵活时长 |
| 高质量 | 高质量输出,可选音频(pro模式) |
| 高质量+快速 | 速度与画质的最佳平衡 |
| 高质量 | 高质量输出 |
| 高质量 | v2版本的改进版 |
| 改进版 | 画质优于v1版本 |
| 标准 | 基础生成能力,成本最低 |
| 高端 | 最高画质(智能模型) |
Quality Modes
画质模式
| Mode | Speed | Cost | Use For |
|---|---|---|---|
| Slower | Lower | Draft/preview |
| Faster | Higher | Final output |
| — | Premium | Native 4K output — only |
| 模式 | 速度 | 成本 | 适用场景 |
|---|---|---|---|
| 较慢 | 较低 | 草稿/预览 |
| 较快 | 较高 | 最终输出 |
| — | 高端 | 原生4K输出 — 仅支持 |
Workflows
工作流
1. Text-to-Video
1. 文本转视频
json
POST /kling/videos
{
"action": "text2video",
"prompt": "a futuristic city with flying cars",
"model": "kling-v3",
"mode": "std",
"duration": 5,
"aspect_ratio": "16:9"
}json
POST /kling/videos
{
"action": "text2video",
"prompt": "a futuristic city with flying cars",
"model": "kling-v3",
"mode": "std",
"duration": 5,
"aspect_ratio": "16:9"
}2. Image-to-Video
2. 图像转视频
Animate a still image. Optionally specify an ending frame.
json
POST /kling/videos
{
"action": "image2video",
"prompt": "the scene slowly comes alive with movement",
"start_image_url": "https://example.com/scene.jpg",
"end_image_url": "https://example.com/end-scene.jpg",
"model": "kling-v3",
"mode": "pro"
}将静态图像动画化。可选择指定结束帧。
json
POST /kling/videos
{
"action": "image2video",
"prompt": "the scene slowly comes alive with movement",
"start_image_url": "https://example.com/scene.jpg",
"end_image_url": "https://example.com/end-scene.jpg",
"model": "kling-v3",
"mode": "pro"
}3. Extend Video
3. 视频扩展
Continue an existing video with additional seconds.
json
POST /kling/videos
{
"action": "extend",
"video_id": "existing-video-id",
"prompt": "the camera pulls back to reveal the full landscape",
"model": "kling-v2-5-turbo"
}为现有视频添加额外时长,继续生成内容。
json
POST /kling/videos
{
"action": "extend",
"video_id": "existing-video-id",
"prompt": "the camera pulls back to reveal the full landscape",
"model": "kling-v2-5-turbo"
}4. Motion Control
4. 运动控制
Apply precise camera/motion control from an image + reference video.
json
POST /kling/motion
{
"image_url": "https://example.com/subject.jpg",
"video_url": "https://example.com/motion-reference.mp4"
}通过图像+参考视频实现精准的相机/运动控制。
json
POST /kling/motion
{
"image_url": "https://example.com/subject.jpg",
"video_url": "https://example.com/motion-reference.mp4"
}5. Lip Sync
5. 唇形同步
Create a lip-synced video from a source video plus either an audio track or input text.
json
POST /kling/lip-sync
{
"video_url": "https://example.com/source.mp4",
"mode": "audio2video",
"audio_url": "https://example.com/voiceover.mp3"
}从源视频加上音频轨道或输入文本,生成唇形同步的视频。
json
POST /kling/lip-sync
{
"video_url": "https://example.com/source.mp4",
"mode": "audio2video",
"audio_url": "https://example.com/voiceover.mp3"
}6. Talking Photo
6. 对话照片
Animate a still portrait from an image plus an audio track.
json
POST /kling/talking-photo
{
"image_url": "https://example.com/portrait.jpg",
"audio_url": "https://example.com/voiceover.mp3",
"model": "kling-v2-1-master",
"duration": 5,
"mode": "pro"
}从图像加上音频轨道,将静态肖像动画化。
json
POST /kling/talking-photo
{
"image_url": "https://example.com/portrait.jpg",
"audio_url": "https://example.com/voiceover.mp3",
"model": "kling-v2-1-master",
"duration": 5,
"mode": "pro"
}Parameters
参数说明
| Parameter | Values | Description |
|---|---|---|
| | Generation mode |
| See models table | Model to use |
| | Quality mode ( |
| | Duration in seconds |
| | Generate audio with video (v3, v3-omni, v2-6 pro only) |
| | Video aspect ratio |
| 0–1 | Prompt relevance strength |
| string | What to avoid in the video |
| object | Camera movement parameters |
| array | Reference subjects from the element library (each item has |
| array | Reference video(s) via |
| string | Async callback URL |
| | Lip-sync mode |
| URL | Source video URL for lip-sync |
| string | Existing Kling video ID for lip-sync |
| URL | Audio source URL (for |
| | Audio input type (default |
| string | Audio file payload when |
| string | Input text to synthesize speech (for |
| string | Voice preset ID used in |
| | TTS language for |
| number | TTS speaking speed (default |
| URL | Source portrait image |
| URL | Driving audio track |
| | Talking-photo model |
| | Talking-photo duration |
| | Talking-photo quality mode |
| 参数 | 取值 | 说明 |
|---|---|---|
| | 生成模式 |
| 见模型表格 | 使用的模型 |
| | 画质模式( |
| | 视频时长(秒) |
| | 随视频生成音频(仅v3、v3-omni、v2-6的pro模式支持) |
| | 视频宽高比 |
| 0–1 | 提示词关联强度 |
| 字符串 | 视频中需要避免的内容 |
| 对象 | 相机运动参数 |
| 数组 | 元素库中的参考主体(每个条目包含 |
| 数组 | 通过 |
| 字符串 | 异步回调URL |
| | 唇形同步模式 |
| URL | 用于唇形同步的源视频URL |
| 字符串 | 用于唇形同步的现有Kling视频ID |
| URL | 音频源URL(适用于 |
| | 音频输入类型(默认 |
| 字符串 | 当 |
| 字符串 | 用于合成语音的输入文本(适用于 |
| 字符串 | |
| | |
| 数字 | TTS语速(默认1.0) |
| URL | 源肖像图像 |
| URL | 驱动音频轨道 |
| | 对话照片模型 |
| | 对话照片时长 |
| | 对话照片画质模式 |
Gotchas
注意事项
- supports
durationor5seconds for most models;10andkling-v3support flexiblekling-v3-omni–3seconds15 - is only available for
mode=4kandkling-v3and is incompatible withkling-v3-omnicamera_control - enables synchronized audio generation (supported by
generate_audio,kling-v3, andkling-v3-omniin pro mode)kling-v2-6 - is only for
end_image_urlaction — it defines the last frameimage2video - Motion control () is a separate endpoint from video generation
/kling/motion - Lip-sync is a separate endpoint () and requires
/kling/lip-sync; usemodeforaudio_urloraudio2video+ voice fields fortexttext2video - Talking-photo is a separate endpoint () and requires both
/kling/talking-photoandimage_urlaudio_url - mode costs roughly 2x
promode but generates faster with better qualitystd - Task states use (not "succeeded") — check for this value when polling
"succeed" - helps avoid unwanted elements (e.g., "blurry, low quality, text")
negative_prompt
- 大多数模型的支持5或10秒;
duration和kling-v3支持3–15秒的灵活时长kling-v3-omni - 仅适用于
mode=4k和kling-v3,且与kling-v3-omni不兼容camera_control - 可启用同步音频生成(
generate_audio、kling-v3和pro模式下的kling-v3-omni支持)kling-v2-6 - 仅适用于
end_image_url动作——用于定义最后一帧image2video - 运动控制()是独立于视频生成的接口
/kling/motion - 唇形同步是独立接口(),需要指定
/kling/lip-sync;mode模式使用audio2video,audio_url模式使用text2video+语音相关字段text - 对话照片是独立接口(),需要同时传入
/kling/talking-photo和image_urlaudio_url - 模式的成本约为
pro模式的2倍,但生成速度更快、画质更好std - 任务状态使用(而非"succeeded")——轮询时需检查该值
"succeed" - 有助于避免不需要的元素(例如:"模糊、低画质、文字")
negative_prompt