Skill 详情

kling-video-generator

使用 Kling 3.0 Omni 模型从文本、图像或其他视频生成视频,涵盖 t2v、i2v、编辑、多镜头和音频同步视频。

声明的前提(自述): Python

匹配类型直接匹配已针对 视频生成 审核
来源wells1137/​kling-video-generator外部来源
报告安装量81仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: kling-video-generator
description: Generate high-quality videos from text, images, or other videos using the Kling 3.0 Omni model. Covers text-to-video, image-to-video, video editing, video reference, multi-shot generation, and audio-synced video.
version: 1.0.0
metadata:
  openclaw:
    requires:
      env:
        - KLING_ACCESS_KEY
        - KLING_SECRET_KEY
      bins:
        - python3
    primaryEnv: KLING_ACCESS_KEY
    emoji: "🎬"
    homepage: https://github.com/wells1137/kling-video-generator
---

# Kling 3.0 Omni Video Generator

This skill enables the generation and manipulation of videos using the Kling 3.0 Omni model. It provides a structured workflow for constructing API requests based on user intent, ensuring compliance with the model's complex parameter constraints.

## Reference Files

This skill includes the following reference files:

- `references/api_reference.md` — **Complete official API parameter reference**, including all fields, types, constraints, mutual exclusion rules (R1–R10), capability matrix, and invocation examples. **Read this file before constructing any API call.**
- `references/prompt_guide.md` — Kling 3.0 Omni prompt writing principles, official formula, template syntax, and few-shot examples for all major scenarios.
- `scripts/kling_api.py` — Python utility class for JWT authentication, task creation, and polling.

---

## Core Capabilities

- **Text-to-Video**: Generate a video from a textual description.
- **Image-to-Video**: Animate a static image with a descriptive prompt.
- **Video-to-Video (Editing)**: Modify an existing video based on a prompt (e.g., change subject, style).
- **Video-to-Video (Reference)**: Use an existing video as a reference for camera movement and style.
- **Multi-shot Generation**: Create a video with multiple distinct scenes or shots.
- **Audio Generation**: Generate video with synchronized audio, including speech and sound effects.

---

## Workflow: From User Intent to API Call

To correctly use the Kling API, you MUST follow this decision-making workflow to construct the API payload. The process is divided into two main stages: **Prompt Design** and **Parameter Construction**.

### Stage 1: Prompt Design

Before constructing the API call, you must first design the prompt(s) based on the user's request. The quality of the prompt is the single most important factor for a good result.

1.  **Consult the Prompting Guide**: Read `/home/ubuntu/skills/kling-video-generator/references/prompt_guide.md` to understand the core principles, official formula, and few-shot examples for writing effective prompts.

2.  **Identify the Scenario**: Determine which of the following scenarios the user is requesting:
    -   Single-shot video (from text, image, or video)
    -   Multi-shot video (storyboard with multiple scenes)

3.  **Write the Prompt(s)**:
    -   For **single-shot**, write a single, detailed prompt following the guide's formula.
    -   For **multi-shot**, write a separate prompt for each shot/scene.
    -   **Use Template Syntax**: If the user provides reference images, elements, or videos, you MUST use the `<<<image_1>>>`, `<<<element_1>>>`, `<<<video_1>>>` template syntax in the prompt to explicitly reference them. This is a core feature of the Omni model.

### Stage 2: Parameter Construction

Once the prompt(s) are ready, construct the final API request payload by following this decision tree. This ensures all parameter constraints and interdependencies, discovered through extensive testing, are respected.

```mermaid
graph TD
    A[Start] --> B{Multi-shot or Single-shot?};
    B -- Multi-shot --> C[Set `multi_shot: true`];
    B -- Single-shot --> D[Set `multi_shot: false`];

    C --> E{Set `shot_type: "customize"`};
    E --> F[Construct `multi_prompt` array from prompts];
    F --> G[Calculate total duration from `multi_prompt`];
    G --> H[Set top-level `duration`];
    H --> Z[Final Payload];

    D --> I{Video input provided?};
    I --
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作