{
  "markdown": "# kling-video-generator\n\n> An Agent Skill for generating high-quality videos using the **Kling 3.0 Omni** model via the official Kling API.\n\n[![ClawHub](https://img.shields.io/badge/ClawHub-Skill-blue)](https://www.clawhub.ai)\n[![Kling API](https://img.shields.io/badge/Kling-3.0%20Omni-purple)](https://app.klingai.com/global/dev/document-api)\n\n---\n\n## What This Skill Does\n\nThis skill enables an AI agent to generate and manipulate videos using the Kling 3.0 Omni model. It provides a structured, tested workflow for constructing correct API requests based on user intent, covering:\n\n- **Text-to-Video**: Generate a video from a text prompt.\n- **Image-to-Video**: Animate a static image.\n- **Video Editing** (`refer_type: base`): Modify an existing video (e.g., change a subject, alter the scene).\n- **Video Reference** (`refer_type: feature`): Use an existing video as a reference for camera movement and style.\n- **Multi-shot Generation**: Create a video with multiple distinct scenes using `multi_shot: true` + `shot_type: customize`.\n- **Audio Generation**: Generate video with synchronized speech and sound effects.\n\n---\n\n## Key Findings from Testing\n\nThis skill is built on **extensive API testing** of the Kling 3.0 Omni model. The following critical, non-obvious rules were discovered through testing and are embedded into the skill's workflow:\n\n| Parameter | Rule |\n| :--- | :--- |\n| `refer_type` | **Must be explicit.** Omitting it defaults to `base` (editing mode) regardless of prompt intent. Cannot be controlled via prompt alone. |\n| `duration` | **Ignored in `base` (editing) mode.** Output duration always equals input video duration. |\n| `sound` | **Incompatible with `video_list`.** Setting `sound: on` while providing a reference video causes an API error. |\n| `shot_type` | **Must be `customize`** for multi-shot with the Omni model. `intelligence` mode is not supported on `kling-v3-omni`. |\n| `multi_prompt` | `index` must start from **1**. Sum of all `duration` values must equal the top-level `duration`. Max **6 shots**. |\n| `aspect_ratio` | **Required for `feature` mode.** |\n| `image_list` | Max **7 images** without video input, max **4 images** with video input. |\n\n---\n\n## File Structure\n\n```\nkling-video-generator/\n├── SKILL.md                        # Main skill instructions and workflow\n├── README.md                       # This file\n├── references/\n│   └── prompt_guide.md             # Kling 3.0 Omni prompting guide with few-shot examples\n└── scripts/\n    └── kling_api.py                # Python helper for authentication and API calls\n```\n\n---\n\n## Quick Start\n\n### Prerequisites\n\n- Kling API Access Key and Secret Key (from [Kling AI Developer Console](https://app.klingai.com/global/dev))\n- Python 3.8+ with `PyJWT` and `requests` installed\n\n### Setup\n\n```bash\npip install PyJWT requests\nexport KLING_ACCESS_KEY=\"your_access_key\"\nexport KLING_SECRET_KEY=\"your_secret_key\"\n```\n\n### Example: Text-to-Video\n\n```python\nfrom scripts.kling_api import KlingAPI\nimport os\n\napi = KlingAPI(os.environ[\"KLING_ACCESS_KEY\"], os.environ[\"KLING_SECRET_KEY\"])\n\npayload = {\n    \"model_name\": \"kling-v3-omni\",\n    \"prompt\": \"A giant panda wearing black-framed glasses is reading a book in a café, medium shot, blurred background, ambient lighting, cinematic color palette.\",\n    \"aspect_ratio\": \"16:9\",\n    \"duration\": \"5\",\n    \"sound\": \"off\"\n}\n\ntask = api.create_omni_video_task(payload)\ntask_id = task[\"data\"][\"task_id\"]\nresult = api.poll_for_completion(task_id)\nprint(\"Video URL:\", result[\"videos\"][0][\"url\"])\n```\n\n### Example: Multi-shot Video\n\n```python\npayload = {\n    \"model_name\": \"kling-v3-omni\",\n    \"multi_shot\": True,\n    \"shot_type\": \"customize\",\n    \"duration\": \"10\",\n    \"aspect_ratio\": \"16:9\",\n    \"multi_prompt\": [\n        {\"index\": 1, \"prompt\": \"Aerial wide shot of a sunny beach at golden hour, calm waves.\", \"duration\": \"3\"},\n        {\"index\": 2, \"prompt\": \"A golden retriever runs at full speed toward the ocean, water splashing, dynamic tracking shot.\", \"duration\": \"4\"},\n        {\"index\": 3, \"prompt\": \"Close-up of the golden retriever face, tongue out, happily swimming.\", \"duration\": \"3\"}\n    ]\n}\n```\n\n---\n\n## Prompting Guide\n\nThe skill includes a comprehensive prompting guide at `references/prompt_guide.md`, covering:\n\n- **Official Prompt Formula**: `Subject + Movement + Scene + [Camera + Lighting + Atmosphere]`\n- **Template Syntax**: How to use `<<<image_1>>>`, `<<<element_1>>>`, `<<<video_1>>>` to reference input assets\n- **Few-shot Examples**: For single-shot, multi-shot, dialogue, editing, and reference scenarios\n- **Common Mistakes**: 7 tested anti-patterns to avoid\n\n---\n\n## License\n\nMIT License — feel free to use, modify, and distribute.\n\n---\n\n*Built and tested against Kling 3.0 Omni API — February 2026*\n\n\n---\n\n## Publishing to ClawHub\n\nTo publish this skill to the [ClawHub registry](https://www.clawhub.ai), use the `clawhub` CLI:\n\n```bash\n# First, log in to ClawHub\nclawhub login\n\n# Then, publish the skill from its root directory\nclawhub publish . --slug kling-video-generator --name \"Kling 3.0 Video Generator\" --version 1.0.0 --changelog \"Initial release based on extensive API testing\"\n```\n",
  "bytes": 5166,
  "sha": "260a5680dc38390aeb66237a054f5e211d2a1623d88d9173ae51589655ec2a52",
  "repo_slug": "wells1137/kling-video-generator",
  "fonte": "repo",
  "truncated": false,
  "api": "https://api.agentalog.com/api/listings/skl_wells1137_kling_video_generator_kling_vi_0fc19279/readme"
}