kling-official

Guides correct usage of the official Kling API for video, image, TTS, avatar, and lip-sync generation.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/zamansepeti43/c-rak-agent --skill kling-official-zamansepeti43
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kling-official
Source: https://github.com/zamansepeti43/c-rak-agent/tree/main/video-engine/.agents/skills/kling-official
Command: npx skills add https://github.com/zamansepeti43/c-rak-agent --skill kling-official-zamansepeti43

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Integrating the official Kling API is error-prone because it uses multiple task protocols (Classic, Turbo, Omni) with different ID paths, status values, and result structures, and it is easily confused with the fal.ai Kling gateway. This Skill provides the authoritative guidance needed before calling any kling_official_* tool so requests are authenticated, parsed, and billed correctly. ## Core Features & Use Cases - Provider Disambiguation: Clearly separates the official Kling API (KLING_API_KEY, Bearer auth) from the fal.ai gateway (FAL_KEY), preventing silent provider switching. - Protocol-Specific Parsing: Documents Classic (data.task_id, succeed) versus Turbo (data.id, succeeded) task protocols so parsers never guess between formats. - Full Capability Coverage: Covers text/image/reference-to-video, image generation and Omni references, TTS with explicit voice_id, avatar generation, and two-step lip sync with face identification. - Error & Cost Governance: Defines which error codes must not be retried (auth, balance, permission, safety) and requires non-zero cost estimates on paid results. - Use Case: When building an OpenMontage pipeline that generates a talking-avatar video, use this Skill to correctly call kling_avatar with a base64-encoded image and audio_id, then poll the Classic task protocol until the status is succeed. ## Quick Start Ask the AI to generate a video with the kling_official_video tool using the official Kling API and your KLING_API_KEY.

Frequently Asked Questions about kling-official

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call the official Kling API for video generation?

Use the kling_official_video tool with provider="kling_official", authenticating with Authorization: Bearer <KLING_API_KEY> against https://api-singapore.klingai.com. Choose an operation (text_to_video, image_to_video, reference_to_video) and an api_family (classic, turbo, omni), then poll the task until it succeeds.

What is the difference between Kling official API and fal.ai Kling?

The official Kling API uses KLING_API_KEY with Bearer auth and official task protocols, while the fal.ai gateway uses FAL_KEY with fal.ai queue URLs and provider="kling". The two paths must never be silently switched; if one provider is unavailable, surface the blocker and ask before substituting.

How do I parse Kling Classic versus Turbo task responses?

Classic tasks return data.task_id with statuses submitted, processing, succeed, failed, while Turbo tasks return data.id, are polled via GET /tasks?task_ids=<id>, and use succeeded instead of succeed. Keep separate parsers and never write fuzzy logic guessing between the two formats.

Which Kling API errors should not be retried?

Do not retry auth failures (1000-1004), balance or resource-pack exhaustion (1101, 1102), permission errors (1103), parameter errors (1200, 1201), or safety policy violations (1301). Limited retries are acceptable for rate limits (1302), concurrency limits (1303), and server errors (5000-5002).

Can I use local video files with Kling lip sync or Turbo image-to-video?

No. Local video paths must not be silently uploaded through fal.ai or any other provider; you must supply a reachable URL. For lip sync, first call identify-face with a video_id or video_url, then advanced-lip-sync with the chosen face_id.

Does Kling TTS require a voice_id?

Yes, kling_tts requires an explicit voice_id unless an official account-specific default has been verified; never hard-code a made-up voice. It also accepts voice_language (zh or en) and voice_speed, and results must include the task_id and a non-zero cost_usd.