Kling Video Generation
Generate AI videos through AceDataCloud's Kuaishou Kling API.
Setup: See authentication for token setup.
Quick Start
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 via POST /kling/tasks with {"id": "..."}.
Models
| Model |
Quality |
Best For |
kling-v3 |
Latest |
Best quality, flexible 3–15s duration, optional audio generation |
kling-v3-omni |
Latest |
V3 Omni model with audio plus image/video references, flexible 3–15s duration |
kling-v2-6 |
High |
High-quality output with optional audio (pro mode) |
kling-v2-5-turbo |
High + Fast |
Best speed/quality trade-off |
kling-v2-master |
High |
High-quality output |
kling-v2-1-master |
High |
Improved v2 |
kling-v1-6 |
Improved |
Better quality than v1 |
kling-v1 |
Standard |
Basic generation, lowest cost |
kling-o1 |
Premium |
Independent O1 model with image/video references, 5s only |
Quality Modes
| Mode |
Speed |
Cost |
Use For |
std (Standard) |
Slower |
Lower |
Draft/preview |
pro (Professional) |
Faster |
Higher |
Final output |
4k (Native 4K) |
— |
Premium |
Native 4K output — only kling-v3 and kling-v3-omni; incompatible with camera_control |
Workflows
1. Text-to-Video
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
Animate a still image. Optionally specify an ending frame.
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. Omni References
Use kling-o1 or kling-v3-omni with reference images and/or one reference video. Cite each item in the prompt using its one-based token.
POST /kling/videos
{
"action": "text2video",
"prompt": "turn <<<video_1>>> into hand-painted animation while preserving its motion",
"model": "kling-o1",
"mode": "std",
"duration": 5,
"video_list": [
{
"video_url": "https://example.com/source.mp4",
"refer_type": "base",
"keep_original_sound": "no"
}
]
}
Use refer_type: "feature" to reference style, motion, or a neighboring shot. Use refer_type: "base" to edit the supplied video. A base video cannot be combined with first/end frames.
4. Extend Video
Continue an existing video with additional seconds.
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"
}
5. Motion Control
Apply precise camera/motion control from an image + reference video.
POST /kling/motion
{
"image_url": "https://example.com/subject.jpg",
"video_url": "https://example.com/motion-reference.mp4",
"mode": "std",
"character_orientation": "image"
}
6. Lip Sync
Create a lip-synced video from a source video plus either an audio track or input text.
POST /kling/lip-sync
{
"video_url": "https://example.com/source.mp4",
"mode": "audio2video",
"audio_url": "https://example.com/voiceover.mp3"
}
7. Talking Photo
Animate a still portrait from an image plus an audio track.
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 |
action |
"text2video", "image2video", "extend" |
Generation mode |
model |
See models table |
Model to use |
prompt |
string |
Required generation or continuation instructions |
mode |
"std", "pro", "4k" |
Quality mode (4k only for kling-v3 / kling-v3-omni, incompatible with camera_control) |
duration |
O1: 5; v3/v3-omni: 3–15; others: 5, 10 |
Duration in seconds |
start_image_url |
URL |
Required first frame for action=image2video |
end_image_url |
URL |
Optional end frame for image2video; requires start_image_url |
video_id |
string |
Existing Kling video ID required by action=extend |
generate_audio |
true, false |
Generate audio with video (v3, v3-omni, v2-6 pro only) |
aspect_ratio |
"16:9", "9:16", "1:1" |
Video aspect ratio |
cfg_scale |
0–1 |
Prompt relevance strength |
negative_prompt |
string |
What to avoid in the video |
camera_control |
object |
Camera movement parameters |
image_list |
array |
Omni reference images for kling-o1 / kling-v3-omni; each item has image_url and optional type (first_frame / end_frame). Up to 7 images without a reference video, or 4 with one, including first/end frames |
video_list |
array |
One MP4/MOV Omni reference video for kling-o1 / kling-v3-omni (3–10s, 720–2160px, 24–60fps, ≤200MB); item has video_url, refer_type (feature / base), and keep_original_sound (yes / no) |
callback_url |
string |
Async callback URL |
mode (/kling/lip-sync) |
"audio2video", "text2video" |
Lip-sync mode |
video_url (/kling/lip-sync) |
URL |
Source video URL for lip-sync |
video_id (/kling/lip-sync) |
string |
Existing Kling video ID for lip-sync |
audio_url (/kling/lip-sync) |
URL |
Audio source URL (for audio2video) |
audio_type (/kling/lip-sync) |
"url", "file" |
Audio input type (default url) |
audio_file (/kling/lip-sync) |
string |
Audio file payload when audio_type=file |
text (/kling/lip-sync) |
string |
Input text to synthesize speech (for text2video) |
voice_id (/kling/lip-sync) |
string |
Voice preset ID used in text2video |
voice_language (/kling/lip-sync) |
"zh", "en" |
TTS language for text2video (default zh) |
voice_speed (/kling/lip-sync) |
number |
TTS speaking speed (default 1.0) |
mode (/kling/motion) |
"std", "pro" |
Motion generation quality mode |
character_orientation (/kling/motion) |
"image", "video" |
Character orientation source |
image_url (/kling/talking-photo) |
URL |
Source portrait image |
audio_url (/kling/talking-photo) |
URL |
Driving audio track |
model (/kling/talking-photo) |
"kling-v1", "kling-v1-6", "kling-v2-master", "kling-v2-1-master", "kling-v2-5-turbo", "kling-v2-6" |
Talking-photo model |
duration (/kling/talking-photo) |
5, 10 |
Talking-photo duration |
mode (/kling/talking-photo) |
"std", "pro" |
Talking-photo quality mode |
Gotchas
kling-o1 supports duration=5 only; kling-v3 and kling-v3-omni support flexible 3–15 seconds; most other models support 5 or 10
mode=4k is only available for kling-v3 and kling-v3-omni and is incompatible with camera_control
generate_audio enables synchronized audio generation (supported by kling-v3, kling-v3-omni, and kling-v2-6 in pro mode)
end_image_url is only for image2video action — it defines the last frame
- Omni references are supported only by
kling-o1 and kling-v3-omni; cite them as <<<image_N>>> / <<<video_1>>>
- Omni reference requests do not support
negative_prompt, cfg_scale, camera_control, or mode=4k
- With
video_list, generate_audio must be false; a base video cannot be combined with first/end frames
element_list is intentionally unavailable because upstream Element IDs are not tenant-scoped; use image_list for subject references
- Motion control (
/kling/motion) is a separate endpoint from video generation
- Lip-sync is a separate endpoint (
/kling/lip-sync) and requires mode; use audio_url for audio2video or text + voice fields for text2video
- Talking-photo is a separate endpoint (
/kling/talking-photo) and requires both image_url and audio_url
pro mode costs roughly 2x std mode but generates faster with better quality
- Task states use
"succeed" (not "succeeded") — check for this value when polling
negative_prompt helps avoid unwanted elements (e.g., "blurry, low quality, text")
1---2name: kling-video3description: Generate AI videos with Kuaishou Kling via AceDataCloud API. Use when creating videos from text or images, extending existing videos, applying motion control, animating a talking photo from image+audio, or lip-syncing audio/text to video. Supports text-to-video, image-to-video, extend, motion generation, talking-photo, and lip-sync with multiple models and quality modes.4license: Apache-2.05---6
7# Kling Video Generation
8
9Generate AI videos through AceDataCloud's Kuaishou Kling API.
10
11> **Setup:** See [authentication](../_shared/authentication.md) for token setup.
12
13## Quick Start
14
15```bash
16curl -X POST https://api.acedata.cloud/kling/videos \
17 -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
18 -H "Content-Type: application/json" \
19 -d '{"action": "text2video", "prompt": "a cat playing piano on a rooftop at sunset", "model": "kling-v3", "mode": "std", "duration": 5}'
20```
21
22> **Async:** See [async task polling](../_shared/async-tasks.md). Poll via `POST /kling/tasks` with `{"id": "..."}`.
23## Models
24
25| Model | Quality | Best For |
26|-------|---------|----------|
27| `kling-v3` | Latest | Best quality, flexible 3–15s duration, optional audio generation |
28| `kling-v3-omni` | Latest | V3 Omni model with audio plus image/video references, flexible 3–15s duration |
29| `kling-v2-6` | High | High-quality output with optional audio (pro mode) |
30| `kling-v2-5-turbo` | High + Fast | Best speed/quality trade-off |
31| `kling-v2-master` | High | High-quality output |
32| `kling-v2-1-master` | High | Improved v2 |
33| `kling-v1-6` | Improved | Better quality than v1 |
34| `kling-v1` | Standard | Basic generation, lowest cost |
35| `kling-o1` | Premium | Independent O1 model with image/video references, 5s only |
36
37## Quality Modes
38
39| Mode | Speed | Cost | Use For |
40|------|-------|------|---------|
41| `std` (Standard) | Slower | Lower | Draft/preview |
42| `pro` (Professional) | Faster | Higher | Final output |
43| `4k` (Native 4K) | — | Premium | Native 4K output — only `kling-v3` and `kling-v3-omni`; incompatible with `camera_control` |
44
45## Workflows
46
47### 1. Text-to-Video
48
49```json
50POST /kling/videos
51{
52 "action": "text2video",
53 "prompt": "a futuristic city with flying cars",
54 "model": "kling-v3",
55 "mode": "std",
56 "duration": 5,
57 "aspect_ratio": "16:9"
58}
59```
60
61### 2. Image-to-Video
62
63Animate a still image. Optionally specify an ending frame.
64
65```json
66POST /kling/videos
67{
68 "action": "image2video",
69 "prompt": "the scene slowly comes alive with movement",
70 "start_image_url": "https://example.com/scene.jpg",
71 "end_image_url": "https://example.com/end-scene.jpg",
72 "model": "kling-v3",
73 "mode": "pro"
74}
75```
76
77### 3. Omni References
78
79Use `kling-o1` or `kling-v3-omni` with reference images and/or one reference video. Cite each item in the prompt using its one-based token.
80
81```json
82POST /kling/videos
83{
84 "action": "text2video",
85 "prompt": "turn <<<video_1>>> into hand-painted animation while preserving its motion",
86 "model": "kling-o1",
87 "mode": "std",
88 "duration": 5,
89 "video_list": [
90 {
91 "video_url": "https://example.com/source.mp4",
92 "refer_type": "base",
93 "keep_original_sound": "no"
94 }
95 ]
96}
97```
98
99Use `refer_type: "feature"` to reference style, motion, or a neighboring shot. Use `refer_type: "base"` to edit the supplied video. A base video cannot be combined with first/end frames.
100
101### 4. Extend Video
102
103Continue an existing video with additional seconds.
104
105```json
106POST /kling/videos
107{
108 "action": "extend",
109 "video_id": "existing-video-id",
110 "prompt": "the camera pulls back to reveal the full landscape",
111 "model": "kling-v2-5-turbo"
112}
113```
114
115### 5. Motion Control
116
117Apply precise camera/motion control from an image + reference video.
118
119```json
120POST /kling/motion
121{
122 "image_url": "https://example.com/subject.jpg",
123 "video_url": "https://example.com/motion-reference.mp4",
124 "mode": "std",
125 "character_orientation": "image"
126}
127```
128
129### 6. Lip Sync
130
131Create a lip-synced video from a source video plus either an audio track or input text.
132
133```json
134POST /kling/lip-sync
135{
136 "video_url": "https://example.com/source.mp4",
137 "mode": "audio2video",
138 "audio_url": "https://example.com/voiceover.mp3"
139}
140```
141
142### 7. Talking Photo
143
144Animate a still portrait from an image plus an audio track.
145
146```json
147POST /kling/talking-photo
148{
149 "image_url": "https://example.com/portrait.jpg",
150 "audio_url": "https://example.com/voiceover.mp3",
151 "model": "kling-v2-1-master",
152 "duration": 5,
153 "mode": "pro"
154}
155```
156
157## Parameters
158
159| Parameter | Values | Description |
160|-----------|--------|-------------|
161| `action` | `"text2video"`, `"image2video"`, `"extend"` | Generation mode |
162| `model` | See models table | Model to use |
163| `prompt` | string | Required generation or continuation instructions |
164| `mode` | `"std"`, `"pro"`, `"4k"` | Quality mode (`4k` only for `kling-v3` / `kling-v3-omni`, incompatible with `camera_control`) |
165| `duration` | O1: `5`; v3/v3-omni: `3`–`15`; others: `5`, `10` | Duration in seconds |
166| `start_image_url` | URL | Required first frame for `action=image2video` |
167| `end_image_url` | URL | Optional end frame for `image2video`; requires `start_image_url` |
168| `video_id` | string | Existing Kling video ID required by `action=extend` |
169| `generate_audio` | `true`, `false` | Generate audio with video (v3, v3-omni, v2-6 pro only) |
170| `aspect_ratio` | `"16:9"`, `"9:16"`, `"1:1"` | Video aspect ratio |
171| `cfg_scale` | 0–1 | Prompt relevance strength |
172| `negative_prompt` | string | What to avoid in the video |
173| `camera_control` | object | Camera movement parameters |
174| `image_list` | array | Omni reference images for `kling-o1` / `kling-v3-omni`; each item has `image_url` and optional `type` (`first_frame` / `end_frame`). Up to 7 images without a reference video, or 4 with one, including first/end frames |
175| `video_list` | array | One MP4/MOV Omni reference video for `kling-o1` / `kling-v3-omni` (3–10s, 720–2160px, 24–60fps, ≤200MB); item has `video_url`, `refer_type` (`feature` / `base`), and `keep_original_sound` (`yes` / `no`) |
176| `callback_url` | string | Async callback URL |
177| `mode` (`/kling/lip-sync`) | `"audio2video"`, `"text2video"` | Lip-sync mode |
178| `video_url` (`/kling/lip-sync`) | URL | Source video URL for lip-sync |
179| `video_id` (`/kling/lip-sync`) | string | Existing Kling video ID for lip-sync |
180| `audio_url` (`/kling/lip-sync`) | URL | Audio source URL (for `audio2video`) |
181| `audio_type` (`/kling/lip-sync`) | `"url"`, `"file"` | Audio input type (default `url`) |
182| `audio_file` (`/kling/lip-sync`) | string | Audio file payload when `audio_type=file` |
183| `text` (`/kling/lip-sync`) | string | Input text to synthesize speech (for `text2video`) |
184| `voice_id` (`/kling/lip-sync`) | string | Voice preset ID used in `text2video` |
185| `voice_language` (`/kling/lip-sync`) | `"zh"`, `"en"` | TTS language for `text2video` (default `zh`) |
186| `voice_speed` (`/kling/lip-sync`) | number | TTS speaking speed (default `1.0`) |
187| `mode` (`/kling/motion`) | `"std"`, `"pro"` | Motion generation quality mode |
188| `character_orientation` (`/kling/motion`) | `"image"`, `"video"` | Character orientation source |
189| `image_url` (`/kling/talking-photo`) | URL | Source portrait image |
190| `audio_url` (`/kling/talking-photo`) | URL | Driving audio track |
191| `model` (`/kling/talking-photo`) | `"kling-v1"`, `"kling-v1-6"`, `"kling-v2-master"`, `"kling-v2-1-master"`, `"kling-v2-5-turbo"`, `"kling-v2-6"` | Talking-photo model |
192| `duration` (`/kling/talking-photo`) | `5`, `10` | Talking-photo duration |
193| `mode` (`/kling/talking-photo`) | `"std"`, `"pro"` | Talking-photo quality mode |
194
195## Gotchas
196
197- `kling-o1` supports `duration=5` only; `kling-v3` and `kling-v3-omni` support flexible `3`–`15` seconds; most other models support `5` or `10`
198- `mode=4k` is only available for `kling-v3` and `kling-v3-omni` and is incompatible with `camera_control`
199- `generate_audio` enables synchronized audio generation (supported by `kling-v3`, `kling-v3-omni`, and `kling-v2-6` in pro mode)
200- `end_image_url` is only for `image2video` action — it defines the last frame
201- Omni references are supported only by `kling-o1` and `kling-v3-omni`; cite them as `<<<image_N>>>` / `<<<video_1>>>`
202- Omni reference requests do not support `negative_prompt`, `cfg_scale`, `camera_control`, or `mode=4k`
203- With `video_list`, `generate_audio` must be `false`; a base video cannot be combined with first/end frames
204- `element_list` is intentionally unavailable because upstream Element IDs are not tenant-scoped; use `image_list` for subject references
205- Motion control (`/kling/motion`) is a separate endpoint from video generation
206- Lip-sync is a separate endpoint (`/kling/lip-sync`) and requires `mode`; use `audio_url` for `audio2video` or `text` + voice fields for `text2video`
207- Talking-photo is a separate endpoint (`/kling/talking-photo`) and requires both `image_url` and `audio_url`
208- `pro` mode costs roughly 2x `std` mode but generates faster with better quality
209- Task states use `"succeed"` (not "succeeded") — check for this value when polling
210- `negative_prompt` helps avoid unwanted elements (e.g., "blurry, low quality, text")