Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Downloads Kling AI generated videos from temporary CDN links and stores them in S3, GCS, or Azure Blob.
45% 73%+27 ptsof test cases passed
Passed 16 of 22 test cases with the skill, and 10 of 22 without it.
When preserving metadata for a generated video saved as `/tmp/output/video_123.mp4`, what filename and extension should be given to the sidecar JSON metadata file?
Replaces .mp4 extension with .meta.json.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Kling AI video URLs from task_result.videos[].url are temporary CDN links that expire. You must download and store videos in your own storage. This skill covers S3, GCS, and Azure Blob.
import requests
import os
def download_video(video_url: str, output_dir: str = "output") -> str:
"""Download generated video from Kling CDN."""
os.makedirs(output_dir, exist_ok=True)
# Extract filename or generate one
filename = video_url.split("/")[-1].split("?")[0]
if not filename.endswith(".mp4"):
filename = f"kling_{int(time.time())}.mp4"
filepath = os.path.join(output_dir, filename)
response = requests.get(video_url, stream=True, timeout=120)
response.raise_for_status()
with open(filepath, "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
size_mb = os.path.getsize(filepath) / (1024 * 1024)
print(f"Downloaded: {filepath} ({size_mb:.1f} MB)")
return filepath
import boto3
def upload_to_s3(filepath: str, bucket: str, key_prefix: str = "kling-videos/") -> str:
Next to this one in the catalogue, plus more from the same author.