Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Animate static images into video using Kling AI. Use when converting images to video, adding motion to stills, or building I2V pipelines. Trigger with phrases like 'klingai image to video', 'kling ai animate image', 'klingai img2vid', 'animate picture klingai'.
.claude/skills/jeremylongshore-klingai-image-to-video/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 0% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 76% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 40% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 30% | 0% |
Animate static images using the /v1/videos/image2video endpoint. Supports motion prompts, camera control, dynamic masks (motion brush), static masks, and tail images for start-to-end transitions.
Endpoint: POST https://api.klingai.com/v1/videos/image2video
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | model_name | string | Yes | kling-v1-5, kling-v2-1, kling-v2-master, etc. | | image | string | Yes | URL of the source image (JPG, PNG, WebP) | | prompt | string | No | Motion description for the animation | | negative_prompt | string | No | What to exclude | | duration | string | Yes | "5" or "10" seconds | | aspect_ratio | string | No | "16:9" default | | mode | string | No | "standard" or "professional" | | cfg_scale | float | No | Prompt adherence (0.0-1.0) | | image_tail | string | No | End-frame image URL (mutually exclusive with masks/camera) | | camera_control | object | No | Camera movement (mutually exclusive with masks/image_tail) | | static_mask | string | No | Mask image URL for fixed regions | | dynamic_masks | array | No | Motion brush trajectories | | callback_url | string | No | Webhook for completion |
pythonimport jwt, time, os, requests BASE = "https://api.klingai.com/v1" def get_headers(): ak, sk = os.environ["KLING_ACCESS_KEY"], os.environ["KLING_SECRET_KEY"] token = jwt.encode( {"iss": ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5}, sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"} ) return {"Authorization": f"Bearer {token}", "Content-Type": "application/json"} # Animate a landscape photo response = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={ "model_name": "kling-v2-1", "image": "https://example.com/landscape.jpg", "prompt": "Clouds slowly drifting across the sky, gentle wind rustling through trees", "negative_prompt": "static, frozen, blurry", "duration": "5", "mode": "standard", }) task_id = response.json()["data"]["task_id"] # Poll for result while True: time.sleep(15) result = requests.get( f"{BASE}/videos/image2video/{task_id}", headers=get_headers() ).json() if result["data"]["task_status"] == "succeed": print(f"Video: {result['data']['task_result']['videos'][0]['url']}") break elif result["data"]["task_status"] == "failed": raise RuntimeError(result["data"]["task_status_msg"])
Use image_tail to specify both the first and last frame. Kling interpolates the motion between them.
pythonresponse = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={ "model_name": "kling-v2-master", "image": "https://example.com/sunrise.jpg", # first frame "image_tail": "https://example.com/sunset.jpg", # last frame "prompt": "Time lapse of sun moving across the sky", "duration": "5", "mode": "professional", })
Draw motion paths for specific elements in the image. Up to 6 motion paths per image in v2.6.
pythonresponse = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={ "model_name": "kling-v2-6", "image": "https://example.com/person-standing.jpg", "prompt": "Person walking forward naturally", "duration": "5", "dynamic_masks": [ { "mask": "https://example.com/person-mask.png", # white = selected region "trajectories": [ {"x": 0.5, "y": 0.7, "t": 0.0}, # start position (normalized 0-1) {"x": 0.5, "y": 0.5, "t": 0.5}, # midpoint {"x": 0.5, "y": 0.3, "t": 1.0}, # end position ] } ], })
Keep specific areas of the image static while animating the rest.
pythonresponse = requests.post(f"{BASE}/videos/image2video", headers=get_headers(), json={ "model_name": "kling-v2-master", "image": "https://example.com/scene.jpg", "prompt": "Water flowing in the river, birds flying", "duration": "5", "static_mask": "https://example.com/buildings-mask.png", # white = frozen })
These features cannot be combined in a single request:
| Feature Set A | Feature Set B | |--------------|--------------| | image_tail | dynamic_masks, static_mask, camera_control | | dynamic_masks / static_mask | image_tail, camera_control | | camera_control | image_tail, dynamic_masks, static_mask |
| Constraint | Value | |-----------|-------| | Formats | JPG, PNG, WebP | | Max size | 10 MB | | Min resolution | 300x300 px | | Max resolution | 4096x4096 px | | Mask format | PNG with white (selected) / black (excluded) |
| Error | Cause | Fix | |-------|-------|-----| | 400 invalid image | URL unreachable or wrong format | Verify image URL is publicly accessible | | 400 mutual exclusivity | Combined incompatible features | Use only one feature set per request | | task_status: failed | Image too complex or low quality | Use higher resolution, clearer source | | Mask mismatch | Mask dimensions differ from source | Ensure mask matches source image dimensions |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 14,364 | 18,146 | +26% | 1 | 1 | 0% | 3,297 | 4,619 | +40% | 0 | 0 | — |
case-02 | pass→pass | 18,514 | 5,033 | -73% | 1 | 1 | 0% | 2,081 | 2,696 | +30% | 0 | 0 | — |
case-03 | fail→pass | 23,553 | 9,343 | -60% | 1 | 1 | 0% | 3,761 | 3,774 | +0% | 0 | 0 | — |
case-04 | pass→pass | 13,906 | 12,542 | -10% | 1 | 1 | 0% | 2,056 | 2,966 | +44% | 0 | 0 | — |
case-05 | fail→pass | 15,945 | 11,441 | -28% | 1 | 1 | 0% | 2,091 | 3,114 | +49% | 0 | 0 | — |
case-06 | pass→pass | 20,716 | 8,469 | -59% | 1 | 1 | 0% | 1,157 | 2,300 | +99% | 0 | 0 | — |
case-07 | pass→pass | 12,650 | 2,290 | -82% | 1 | 1 | 0% | 1,301 | 2,166 | +66% | 0 | 0 | — |
case-08 | fail→fail | 20,438 | 13,557 | -34% | 1 | 1 | 0% | 2,418 | 3,665 | +52% | 0 | 0 | — |
case-09 | fail→fail | 18,985 | 23,768 | +25% | 1 | 1 | 0% | 3,181 | 5,606 | +76% | 0 | 0 | — |
case-10 | fail→fail | 18,069 | 21,974 | +22% | 1 | 1 | 0% | 2,400 | 4,058 | +69% | 0 | 0 | — |
case-11 | pass→pass | 17,814 | 10,965 | -38% | 1 | 1 | 0% | 2,349 | 2,878 | +23% | 0 | 0 | — |
case-12 | pass→pass | 13,596 | 9,694 | -29% | 1 | 1 | 0% | 1,425 | 2,362 | +66% | 0 | 0 | — |
case-13 | pass→pass | 15,150 | 11,208 | -26% | 1 | 1 | 0% | 1,879 | 2,679 | +43% | 0 | 0 | — |
case-14 | pass→pass | 12,728 | 5,654 | -56% | 1 | 1 | 0% | 1,353 | 2,532 | +87% | 0 | 0 | — |
case-15 | pass→pass | 12,205 | 7,102 | -42% | 1 | 1 | 0% | 838 | 2,068 | +147% | 0 | 0 | — |
case-16 | fail→pass | 12,690 | 4,373 | -66% | 1 | 1 | 0% | 1,428 | 2,510 | +76% | 0 | 0 | — |
case-17 | pass→pass | 12,336 | 8,242 | -33% | 1 | 1 | 0% | 1,374 | 2,330 | +70% | 0 | 0 | — |
case-18 | pass→pass | 12,330 | 8,187 | -34% | 1 | 1 | 0% | 961 | 2,252 | +134% | 0 | 0 | — |
case-19 | pass→pass | 13,552 | 4,405 | -67% | 1 | 1 | 0% | 1,714 | 2,519 | +47% | 0 | 0 | — |
case-20 | pass→pass | 15,622 | 2,601 | -83% | 1 | 1 | 0% | 1,845 | 2,185 | +18% | 0 | 0 | — |
case-21 | pass→pass | 11,992 | 7,886 | -34% | 1 | 1 | 0% | 1,138 | 2,262 | +99% | 0 | 0 | — |
case-22 | pass→pass | 11,093 | 7,068 | -36% | 1 | 1 | 0% | 1,086 | 1,947 | +79% | 0 | 0 | — |
case-23 | pass→pass | 10,965 | 6,733 | -39% | 1 | 1 | 0% | 1,636 | 1,996 | +22% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.