Summary
通过 Kling AI API / SDK 生成视频,涵盖文生视频、图生视频、AI 数字人、运动控制、多镜头叙事。当用户需要调用 Kling(可灵)生成视频时使用此 skill。触发条件:用户提到 kling、可灵、AI 视频生成、图生视频、数字人、运动控制、Kling 3.0、multi-shot,或需要调用 Kling API/SDK 执行视频生成任务时。来源: https://github.com/runapi-ai/kling
full-aigc-skills/kling-skills · Archived
通过 Kling AI API / SDK 生成视频,涵盖文生视频、图生视频、AI 数字人、运动控制、多镜头叙事。当用户需要调用 Kling(可灵)生成视频时使用此 skill。触发条件:用户提到 kling、可灵、AI 视频生成、图生视频、数字人、运动控制、Kling 3.0、multi-shot,或需要调用 Kling API/SDK 执行视频生成任务时。来源: https://github.com/runapi-ai/kling
npx skills add full-aigc-skills/kling-skills --skill kling-video
通过 Kling AI API / SDK 生成视频,涵盖文生视频、图生视频、AI 数字人、运动控制、多镜头叙事。当用户需要调用 Kling(可灵)生成视频时使用此 skill。触发条件:用户提到 kling、可灵、AI 视频生成、图生视频、数字人、运动控制、Kling 3.0、multi-shot,或需要调用 Kling API/SDK 执行视频生成任务时。来源: https://github.com/runapi-ai/kling
This repository is archived — consider an actively maintained alternative.
为 Kling AI(可灵)视频生成模型撰写高质量提示词。涵盖文生视频和图生视频的提示词框架,?
3 installsKling 3.0 video generation on RunComfy. Kling 3.0 (also called Kling V3.0) is Kuaishou Technolo…
390K installs可灵 AI(Kling)官方 CLI 的使用技能:文生图 / 参考图生图 / 文生视频 / 图生视频。CLI 通过 MCP 服…
7.5K installsGenerate images and videos with Kling O3 — Kling's most powerful model family — via fal.ai.
2.3K installsRelated neighbors and high-traction skills in the same topics — useful to compare before installing.
Write better prompts for Kling 3.0 AI video generation. Use when the user wants to create, writ…
566 installsOfficial Kling direct API guidance for OpenMontage providers. Use before calling `kling_officia…
7 installsGenerate AI videos using Kling video generation models. Use when you need to: (1) create videos…
262 installsGenerate AI videos with Kuaishou Kling via AceDataCloud API.
222 installsThe generative-video producer for native 4K, multi-shot storyboarding, and motion-transfer (Kli…
6 installsGenerate images and videos with Kling O3 — Kling's most powerful model family. Text-to-image, t…
115 installsOther skills from full-aigc-skills/kling-skills.
npx skills add full-aigc-skills/kling-skills
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
main
Parsed from SKILL.md frontmatter.
Files included with this skill beyond the listing page.
SKILL.md
4,672 B
SUMMARY.md
448 B
通过 Kling AI API 生成视频:文生视频、图生视频、AI 数字人、运动控制、多镜头叙事。
npm install @runapi.ai/kling
需要 Node 18+,环境变量 RUNAPIAPIKEY。
import { KlingClient } from "@runapi.ai/kling";
const client = new KlingClient({ apiKey: process.env.RUNAPI_API_KEY });
const result = await client.textToVideo.run({
model: "kling-3.0",
prompt: "一只白猫在雪地里奔跑,阳光透过树枝洒落",
duration: "5"
});
// auto-polling: 每 2s 轮询,最长 15min
生产环境推荐分离式调用:
const task = await client.textToVideo.create({ model: "kling-3.0", prompt: "..." });
const result = await client.textToVideo.get(task.id);
const result = await client.imageToVideo.create({
model: "kling-3.0",
image_urls: ["https://example.com/image.jpg"],
prompt: "让画面中的人物自然微笑并挥手"
});
Kling 3.0 支持一次生成最多 6 个连续镜头:
const result = await client.textToVideo.create({
model: "kling-3.0",
prompt: "[Character A: 白猫] 走过雪地...",
multi_shots: true,
multi_prompt: [
"镜头1: 白猫从远处走来,广角",
"镜头2: 白猫跳跃,特写慢动作",
"镜头3: 白猫消失在雪景中,拉远"
]
});
// 多镜头自动启用配音和唇形同步
const result = await client.aiAvatar.run({
model: "ai-avatar-pro",
image: "https://example.com/portrait.jpg",
audio_url: "https://example.com/speech.mp3",
prompt: "自然微笑,眼神交流"
});
用参考视频驱动静态图像的动态:
const result = await client.motionControl.run({
input_urls: ["https://example.com/static.jpg"],
video_urls: ["https://example.com/motion_ref.mp4"],
character_orientation: "front",
background_source: "original"
});
| 模型 | Model ID | 特性 |
|---|---|---|
| Kling 3.0 | kling-3.0 |
多镜头、原生配音、唇形同步、音色控制 |
| Kling 2.6 Pro | kling-2.6-pro |
元素绑定 (Element Binding)、Motion Brush、角色一致性 |
| V2.5 Turbo T2V | kling-v2.5-turbo-text-to-video-pro |
快速文生视频 |
| V2.5 Turbo I2V | kling-v2.5-turbo-image-to-video-pro |
快速图生视频 |
| AI Avatar Pro | ai-avatar-pro |
高品质数字人 |
| AI Avatar Standard | ai-avatar-standard |
标准数字人 |
const result = await client.textToVideo.create({
model: "kling-2.6-pro",
prompt: "...",
motion_brush: [
{ element: "白猫", motion: "前进移动" },
{ element: "背景树", motion: "轻微摇摆" }
]
});
HMAC-SHA256 签名验证,需在 10s 内返回 2xx:
const crypto = require("crypto");
function verifySignature(payload, signature, secret) {
const expected = crypto.createHmac("sha256", Buffer.from(secret, "base64"))
.update(payload).digest("base64");
return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}
| 类型 | HTTP | 处理 |
|---|---|---|
AuthenticationError |
401 | 检查 API Key |
InsufficientCreditsError |
402 | 充值 |
ValidationError |
422 | 检查请求参数 |
RateLimitError |
429 | 等待重试 |
ServiceUnavailableError |
503 | 稍后重试 |
TaskFailedError |
- | 检查输入/重试 |
TaskTimeoutError |
- | 增加 timeout |
model 参数始终必填multi_shots: trueimage_urls 最多 1 张duration 为字符串格式(如 "5")