klingai-job-monitoring

Featured

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

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 Job Monitoring ## Overview Every Kling AI generation returns a `task_id`. This skill covers polling strategies, batch tracking, timeout handling, and callback-based monitoring for the `/v1/videos/text2video`, `/v1/videos/image2video`, and `/v1/videos/video-extend` endpoints. ## Task Lifecycle | Status | Meaning | Typical Duration | |--------|---------|-----------------| | `submitted` | Queued for processing | 0-30s | | `processing` | Generation in progress | 30-120s (standard), 60-300s (professional) | | `succeed` | Complete, video URL available | Terminal | | `failed` | Generation failed | Terminal | ## Polling a Single Task ```python import 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"} def poll_task(endpoint: str, task_id: str, interval: int = 10, timeout: int = 600): """Poll with adaptive interval and timeout.""" start = time.monotonic() attempts = 0 while time.monotonic() - start < timeout: time.sleep(interval) attempts += 1 r = requests.get(f"{BASE}{endpoint}/{task_id}", headers=get_headers(), timeout=30) data = r.json()["data"] ...

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-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-batch-processing

Process multiple video generation requests efficiently with Kling AI. Use when generating batches of videos or building content pipelines. Trigger with phrases like 'klingai batch', 'kling ai bulk', 'multiple videos klingai', 'klingai parallel generation'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-hello-world

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

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-usage-analytics

Build usage analytics and reporting for Kling AI video generation. Use when tracking patterns, analyzing costs, or building dashboards. Trigger with phrases like 'klingai analytics', 'kling ai usage report', 'klingai metrics', 'video generation stats'.

2,266 Updated today
jeremylongshore
AI & Automation Featured

klingai-common-errors

Diagnose and fix common Kling AI API errors. Use when troubleshooting failed video generation or API issues. Trigger with phrases like 'kling ai error', 'klingai not working', 'fix klingai', 'klingai failed'.

2,266 Updated today
jeremylongshore