Kling
Kling 模型通过一个统一的异步任务 API 调用。用 POST /api/generate 发起任务,再轮询 GET /api/generate/{taskId} 直到完成。本系列提供 15 个端点。
概览
每个端点共享相同的外层结构 —— 只有 model 和 input 字段不同。可在模型市场的 playground 中运行任意一个。
认证
在 /api-keys 创建 API 密钥,然后作为 Bearer token 发送。已登录时从浏览器发起的请求也可通过会话 cookie 生效。
Authorization: Bearer <YOUR_API_KEY>创建任务
POST https://api.lithovas.com/api/generate请求体:{ "model": "<slug>", "input": { … } }
响应:{ "taskId": "<id>", "state": "waiting" }
查询结果
GET https://api.lithovas.com/api/generate/<taskId>响应:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
state 变为 success 或 fail。失败任务不计费。端点
| 模型 | 任务 | model slug |
|---|---|---|
| Kling | Text to Video | kling/text-to-video |
| Kling | Image to Video | kling/image-to-video |
| Kling V25 Turbo | Image to Video | kling/v25-turbo-image-to-video-pro |
| Kling V25 Turbo | Text to Video | kling/v25-turbo-text-to-video-pro |
| Kling | Lip Sync | kling/ai-avatar-standard |
| Kling | Lip Sync | kling/ai-avatar-pro |
| Kling V2 1 Master | Image to Video | kling/v2-1-master-image-to-video |
| Kling V2 1 Master | Text to Video | kling/v2-1-master-text-to-video |
| Kling V2 1 Pro | Image to Video | kling/v2-1-pro |
| Kling V2 1 Standard | Image to Video | kling/v2-1-standard |
| Kling | Image to Video | kling/motion-control |
| Kling | Image to Video | kling/motion-control-v3 |
| Kling 3.0 | Image to Video | kling/kling-3-0 |
| Kling V3 Turbo | Text to Video | kling/v3-turbo-text-to-video |
| Kling V3 Turbo | Image to Video | kling/v3-turbo-image-to-video |
Kling · Text to Video
kling/text-to-videopromptstring必填Text prompt for video generation (max 1000 chars)
soundboolean必填Specifies whether the generated video contains audio
aspect_ratioenum<string>必填Defines the video aspect ratio
durationenum<string>必填Video duration in seconds
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/text-to-video",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"sound": false,
"aspect_ratio": "1:1",
"duration": "5"
}
}'Kling · Image to Video
kling/image-to-videopromptstring必填Text prompt for video generation (max 1000 chars)
image_urlsarray<string>必填Image URLs for video generation; max 1 file, JPEG/PNG, max 10MB
soundboolean必填Specifies whether the generated video contains audio
durationenum<string>必填Video duration in seconds
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/image-to-video",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"image_urls": [
"https://example.com/input.jpg"
],
"sound": false,
"duration": "5"
}
}'Kling V25 Turbo · Image to Video
kling/v25-turbo-image-to-video-propromptstring必填Text prompt describing the video to generate (max 2500 chars)
image_urlstring必填URL of the image to be used for the video (max 10MB)
tail_image_urlstring可选Tail frame image of video (max 10MB)
durationenum<string>可选The duration of the generated video in seconds
negative_promptstring可选Elements to exclude from the video (max 500 chars)
cfg_scalenumber可选CFG scale controlling adherence to prompt (0-1, step 0.1)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v25-turbo-image-to-video-pro",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"image_url": "https://example.com/input.jpg",
"tail_image_url": "https://example.com/input.jpg",
"duration": "5",
"negative_prompt": "example",
"cfg_scale": 0.5
}
}'Kling V25 Turbo · Text to Video
kling/v25-turbo-text-to-video-propromptstring必填Text description of video to generate (max 2500 chars)
durationenum<string>可选Generated video length in seconds
aspect_ratioenum<string>可选Video frame aspect ratio
negative_promptstring可选Elements to avoid in generation (max 2500 chars)
cfg_scalenumber可选Guidance scale controlling prompt adherence (0-1, step 0.1)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v25-turbo-text-to-video-pro",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"duration": "5",
"aspect_ratio": "16:9",
"negative_prompt": "example",
"cfg_scale": 0.5
}
}'Kling · Lip Sync
kling/ai-avatar-standardimage_urlstring必填URL of the image to use as your avatar (JPEG/PNG, max 10MB)
audio_urlstring必填URL of the audio file (MP3/WAV/AAC/M4A/OGG, max 100MB, 5min)
promptstring必填Text direction for video generation (max 5000 chars)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/ai-avatar-standard",
"input": {
"image_url": "https://example.com/input.jpg",
"audio_url": "https://example.com/reference.mp3",
"prompt": "A cinematic red panda surfing through neon rain at dusk."
}
}'Kling · Lip Sync
kling/ai-avatar-proimage_urlstring必填URL of image file to use as avatar (JPEG/PNG, max 10MB)
audio_urlstring必填URL of audio file for speech (MP3/WAV/AAC/MP4/OGG, max 100MB, 5min)
promptstring必填Text prompt for video generation (max 5000 chars)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/ai-avatar-pro",
"input": {
"image_url": "https://example.com/input.jpg",
"audio_url": "https://example.com/reference.mp3",
"prompt": "A cinematic red panda surfing through neon rain at dusk."
}
}'Kling V2 1 Master · Image to Video
kling/v2-1-master-image-to-videopromptstring必填Text describing the video to generate (max 5000 chars)
image_urlstring必填URL of image for video generation (JPEG/PNG, max 10MB)
durationenum<string>可选Duration of generated video in seconds
negative_promptstring可选Elements to exclude from video generation (max 500 chars)
cfg_scalenumber可选Guidance scale controlling prompt adherence (0-1, step 0.1)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v2-1-master-image-to-video",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"image_url": "https://example.com/input.jpg",
"duration": "5",
"negative_prompt": "example",
"cfg_scale": 0.5
}
}'Kling V2 1 Master · Text to Video
kling/v2-1-master-text-to-videopromptstring必填Text describing the video to generate (max 5000 chars)
durationenum<string>可选Generated video length in seconds
aspect_ratioenum<string>可选Video frame aspect ratio
negative_promptstring可选Elements to avoid in video (max 500 chars)
cfg_scalenumber可选Guidance scale adherence to prompt (0-1, step 0.1)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v2-1-master-text-to-video",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"duration": "5",
"aspect_ratio": "16:9",
"negative_prompt": "example",
"cfg_scale": 0.5
}
}'Kling V2 1 Pro · Image to Video
kling/v2-1-propromptstring必填Text prompt describing the video to generate (max 5000 chars)
image_urlstring必填URL of the image to be used for the video (max 10MB)
durationstring可选Duration of the generated video in seconds
negative_promptstring可选Terms to avoid in the generated video (max 500 chars)
cfg_scalenumber可选CFG scale measuring adherence to prompt (0-1, step 0.1)
tail_image_urlstring可选URL of the image for the end of the video (max 10MB)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v2-1-pro",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"image_url": "https://example.com/input.jpg",
"duration": "5",
"negative_prompt": "example",
"cfg_scale": 0.5,
"tail_image_url": "https://example.com/input.jpg"
}
}'Kling V2 1 Standard · Image to Video
kling/v2-1-standardpromptstring必填Text prompt describing the desired video content (max 5000 chars)
image_urlstring必填URL of the image to be used for the video (max 10MB)
durationstring可选Length of generated video in seconds
negative_promptstring可选Elements to avoid in the generated video (max 500 chars)
cfg_scalenumber可选Guidance scale controlling prompt adherence (0-1, step 0.1)
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v2-1-standard",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"image_url": "https://example.com/input.jpg",
"duration": "5",
"negative_prompt": "example",
"cfg_scale": 0.5
}
}'Kling · Image to Video
kling/motion-controlpromptstring可选Text description of desired output (max 2500 chars)
input_urlsarray<string>必填Single image URL showing subject's head, shoulders, torso
video_urlsarray<string>必填Single video URL (3-30s) showing subject's head, shoulders, torso
character_orientationstring必填Character orientation: image for picture pose or video for video pose
modestring必填Output resolution: 720p or 1080p
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/motion-control",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"input_urls": [
"https://example.com/file"
],
"video_urls": [
"https://example.com/reference.mp4"
],
"character_orientation": "image",
"mode": "720p"
}
}'Kling · Image to Video
kling/motion-control-v3promptstring可选Text prompt (0-2500 chars) to guide animation generation
input_urlsarray<string>必填URL of the reference image showing the subject
video_urlsarray<string>必填URL of the motion video defining the motion pattern
modestring可选Video quality: std (720p) or pro (1080p)
character_orientationstring可选Reference for character orientation (video recommended)
background_sourcestring可选Background source selection
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/motion-control-v3",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"input_urls": [
"https://example.com/file"
],
"video_urls": [
"https://example.com/reference.mp4"
],
"mode": "std",
"character_orientation": "video",
"background_source": "input_video"
}
}'Kling 3.0 · Image to Video
kling/kling-3-0promptstring可选Video generation prompt (single-shot mode)
image_urlsarray<string>可选First/last frame image URLs for reference
soundboolean可选Enable/disable sound effects for video
durationstring必填Total video duration in seconds (3-15)
aspect_ratiostring可选Video aspect ratio; auto-adapts if images provided
modestring可选Generation mode controlling resolution output
multi_shotsboolean可选Enable multi-shot mode for multiple shots
multi_promptarray<object>可选Shot array with prompt/duration (multi-shot mode)
kling_elementsarray<object>可选Referenced elements (images/video/audio) max 3
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/kling-3-0",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"image_urls": [
"https://example.com/input.jpg"
],
"sound": false,
"duration": 5,
"aspect_ratio": "16:9",
"mode": "pro",
"multi_shots": false,
"multi_prompt": [],
"kling_elements": []
}
}'Kling V3 Turbo · Text to Video
kling/v3-turbo-text-to-videopromptstring必填Text description of the video to generate (max 2500 chars)
durationstring必填Duration of generated video in seconds (3s-15s range)
aspect_ratiostring必填Aspect ratio of the generated video frame
resolutionstring必填Resolution of the generated video
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v3-turbo-text-to-video",
"input": {
"prompt": "A cinematic red panda surfing through neon rain at dusk.",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "720p"
}
}'Kling V3 Turbo · Image to Video
kling/v3-turbo-image-to-videopromptstring必填Text prompt describing the video to generate (max 2500 chars)
image_urlsarray<string>必填URL of image for video (JPEG/PNG, max 10MB)
durationstring可选Video duration in seconds (3s-15s range)
resolutionstring可选Output video resolution
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling/v3-turbo-image-to-video",
"input": {
"prompt": "Animate the image with natural motion, subtle camera movement, and cinematic lighting.",
"image_urls": [
"https://example.com/input.jpg"
],
"duration": 5,
"resolution": "720p"
}
}'