klingai-hello-world

Featured

Create your first Kling AI video generation with a minimal working example. Use when learning Kling AI or testing your setup. Trigger with phrases like 'kling ai hello world', 'first kling video', 'klingai quickstart', 'test klingai'.

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Kling AI Hello World ## Overview Generate your first AI video in under 20 lines of code. This skill walks through the complete create-poll-download cycle using the Kling AI REST API. **Base URL:** `https://api.klingai.com/v1` ## Prerequisites - Completed `klingai-install-auth` setup - Python 3.8+ with `requests` and `PyJWT` - At least 10 credits in your Kling AI account ## Minimal Example — Python ```python import jwt, time, os, requests # --- Auth --- def get_token(): ak = os.environ["KLING_ACCESS_KEY"] sk = os.environ["KLING_SECRET_KEY"] payload = {"iss": ak, "exp": int(time.time()) + 1800, "nbf": int(time.time()) - 5} return jwt.encode(payload, sk, algorithm="HS256", headers={"alg": "HS256", "typ": "JWT"}) BASE = "https://api.klingai.com/v1" HEADERS = {"Authorization": f"Bearer {get_token()}", "Content-Type": "application/json"} # --- Step 1: Create task --- task = requests.post(f"{BASE}/videos/text2video", headers=HEADERS, json={ "model_name": "kling-v2-master", "prompt": "A golden retriever running through autumn leaves in slow motion, cinematic lighting", "duration": "5", "aspect_ratio": "16:9", "mode": "standard", }).json() task_id = task["data"]["task_id"] print(f"Task created: {task_id}") # --- Step 2: Poll until complete --- import time as t while True: t.sleep(10) status = requests.get(f"{BASE}/videos/text2video/{task_id}", headers=HEADERS).json() state = status["data"]["task_status...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

klingai-ci-integration

Integrate Kling AI video generation into CI/CD pipelines. Use when automating video content in GitHub Actions or GitLab CI. Trigger with phrases like 'klingai ci', 'kling ai github actions', 'klingai automation', 'automated video generation'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-job-monitoring

Track and monitor Kling AI video generation task status. Use when building dashboards, tracking batch jobs, or debugging stuck tasks. Trigger with phrases like 'klingai job status', 'kling ai monitor', 'track klingai task', 'klingai progress'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-async-workflows

Build async video generation workflows with Kling AI using queues, state machines, and event-driven patterns. Trigger with phrases like 'klingai async', 'kling ai workflow', 'klingai pipeline', 'async video generation'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-text-to-video

Generate videos from text prompts with Kling AI. Use when creating videos from descriptions, learning prompt techniques, or building T2V pipelines. Trigger with phrases like 'kling ai text to video', 'klingai prompt', 'generate video from text', 'text2video kling'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-image-to-video

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'.

2,266 Updated today
jeremylongshore