$npx -y skills add wells1137/media-skills --skill kling-studioFull-featured Kling 3.0 Omni video generation skill. Covers text-to-video, image-to-video, video editing (base mode), video reference (feature mode), multi-shot generation, and audio-synced video. Includes validated API constraint rules and prompt engineering guide.
| 1 | # Kling 3.0 Omni Video Generator |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## Reference Files |
| 6 | |
| 7 | This skill includes the following reference files: |
| 8 | |
| 9 | - `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.** |
| 10 | - `references/prompt_guide.md` — Kling 3.0 Omni prompt writing principles, official formula, template syntax, and few-shot examples for all major scenarios. |
| 11 | - `scripts/kling_api.py` — Python utility class for JWT authentication, task creation, and polling. |
| 12 | |
| 13 | --- |
| 14 | |
| 15 | ## Core Capabilities |
| 16 | |
| 17 | - **Text-to-Video**: Generate a video from a textual description. |
| 18 | - **Image-to-Video**: Animate a static image with a descriptive prompt. |
| 19 | - **Video-to-Video (Editing)**: Modify an existing video based on a prompt (e.g., change subject, style). |
| 20 | - **Video-to-Video (Reference)**: Use an existing video as a reference for camera movement and style. |
| 21 | - **Multi-shot Generation**: Create a video with multiple distinct scenes or shots. |
| 22 | - **Audio Generation**: Generate video with synchronized audio, including speech and sound effects. |
| 23 | |
| 24 | --- |
| 25 | |
| 26 | ## Workflow: From User Intent to API Call |
| 27 | |
| 28 | 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**. |
| 29 | |
| 30 | ### Stage 1: Prompt Design |
| 31 | |
| 32 | 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. |
| 33 | |
| 34 | 1. **Consult the Prompting Guide**: Read `/home/ubuntu/skills/kling-studio/references/prompt_guide.md` to understand the core principles, official formula, and few-shot examples for writing effective prompts. |
| 35 | |
| 36 | 2. **Identify the Scenario**: Determine which of the following scenarios the user is requesting: |
| 37 | - Single-shot video (from text, image, or video) |
| 38 | - Multi-shot video (storyboard with multiple scenes) |
| 39 | |
| 40 | 3. **Write the Prompt(s)**: |
| 41 | - For **single-shot**, write a single, detailed prompt following the guide's formula. |
| 42 | - For **multi-shot**, write a separate prompt for each shot/scene. |
| 43 | - **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. |
| 44 | |
| 45 | ### Stage 2: Parameter Construction |
| 46 | |
| 47 | 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. |
| 48 | |
| 49 | ```mermaid |
| 50 | graph TD |
| 51 | A[Start] --> B{Multi-shot or Single-shot?}; |
| 52 | B -- Multi-shot --> C[Set `multi_shot: true`]; |
| 53 | B -- Single-shot --> D[Set `multi_shot: false`]; |
| 54 | |
| 55 | C --> E{Set `shot_type: "customize"`}; |
| 56 | E --> F[Construct `multi_prompt` array from prompts]; |
| 57 | F --> G[Calculate total duration from `multi_prompt`]; |
| 58 | G --> H[Set top-level `duration`]; |
| 59 | H --> Z[Final Payload]; |
| 60 | |
| 61 | D --> I{Video input provided?}; |
| 62 | I -- Yes --> J{Editing or Reference?}; |
| 63 | I -- No --> K[Text/Image-to-Video Path]; |
| 64 | |
| 65 | J -- Editing --> L[Set `refer_type: "base"`]; |
| 66 | J -- Reference --> M[Set `refer_type: "feature"`]; |
| 67 | |
| 68 | L --> N[Ignore `duration` parameter]; |
| 69 | M --> O[Set `aspect_ratio`]; |
| 70 | N --> P{Audio handling}; |
| 71 | O --> P; |
| 72 | |
| 73 | K --> Q{Audio handling}; |
| 74 | P --> R{Audio handling}; |
| 75 | |
| 76 | subgraph R [Audio Handling] |
| 77 | direction LR |
| 78 | R1{Want audio output?} -- Yes --> R2[Set `sound: "on"`]; |
| 79 | R1 -- No --> R3[Set `sound: "off"`]; |
| 80 | R2 --> R4{Video input exists?}; |
| 81 | R4 -- Yes --> R5[ERROR: `sound:on` is incompatible with video input]; |
| 82 | R4 -- No --> R6[OK]; |
| 83 | end |
| 84 | |
| 85 | Q --> Z; |
| 86 | R6 --> Z; |
| 87 | R3 --> Z; |
| 88 | R5 --> Stop([Stop/Error]); |
| 89 | ``` |
| 90 | |
| 91 | #### Key Parameter Rules (from testin |