Generate video with Kling (Kuaishou) through the Kie.ai jobs API.
Setup: needs
KIE_API_KEYin~/.claude/.env.
Models
| Key | Model id | Mode | Notes |
|---|---|---|---|
2.6-t2v (default) |
kling-2.6/text-to-video |
text-to-video | sound optional; 5/10s; 1:1|16:9|9:16 |
2.6-i2v |
kling-2.6/image-to-video |
image-to-video | 1 input image; 5/10s |
3.0 |
kling-3.0/video |
t2v + i2v | 3–15s, multi-shot, native audio, std/pro/4K |
2.1-master-t2v |
kling/v2-1-master-text-to-video |
text-to-video | cfg_scale + negative prompt |
2.1-pro-i2v |
kling/v2-1-pro |
image-to-video | tail/last frame support |
Flow
- Parse
$ARGUMENTS. A start image → image-to-video. - Settings (ask, or defaults):
- Model: default
2.6-t2v. Use3.0for the best quality / 4K / multi-shot;2.1-pro-i2vfor first→last-frame control. - Duration: 5 or 10s (Kling 3.0: 3–15s). The script snaps to allowed values.
- Aspect ratio:
16:9(default),9:16,1:1. - Audio:
--audiofor native sound (2.6 / 3.0). - 3.0 quality mode:
--mode std|pro|4K(defaultpro). - 2.1 tuning:
--cfg-scale 0.5and--negative-prompt "...".
- Model: default
- Craft the prompt (≤1000 chars for 2.6, ≤5000 for 2.1). Show before generating.
- Generate:
python3 ~/.claude/skills/kie-kling-video/generate.py "<prompt>" \
--model 2.6-t2v --duration 5 --aspect-ratio 16:9 [--audio] \
[--image <url-or-path>] [--last-frame <url-or-path>] \
[--mode pro] [--cfg-scale 0.5] [--negative-prompt "..."] \
--slug <slug>
- Present: output →
~/videos/kling/<date>-<slug>/. Offer a longer clip, different model, or audio.
Notes
- Kling is a strong, cost-effective image-to-video workhorse — good default for animating a still.
- Local input images are auto-uploaded.
- Default
9:16for Shorts/Reels/TikTok.