跳到正文
cccskills
免费在 GitHub 公开中文介绍

kling-official

指导在OpenMontage中配置和使用Kling官方API,完成视频与图像生成、语音合成、数字人视频及口型同步,并处理认证、任务状态、结果获取和费用估算。

原文查看原文说明

Official Kling direct API guidance for OpenMontage providers. Use before calling `kling_official_video`, `kling_official_image`, `kling_tts`, `kling_avatar`, or `kling_lip_sync`.

AI 评分90分/ 100查看安装方法

适用场景

  • 根据文字或参考图生成视频
  • 使用参考图生成和编辑图像
  • 使用指定声音合成语音
  • 制作数字人视频并同步口型

中文介绍

功能

指导在OpenMontage中使用Kling官方API时的配置与处理流程,涵盖视频和图像生成、语音合成、数字人视频,以及让嘴部动作配合音频的口型同步。内容包括身份认证、参考图像和视频的传入方式、生成状态查询、结果获取、错误处理与费用估算,并说明各项功能之间的差异。

适用场景

适合根据文字或参考图像制作视频,或使用相同参考素材生成图像。将官方API接入OpenMontage流程时,也可用来梳理Classic、Turbo和Omni各自不同的输入格式与结果格式。

使用示例

  • “配置Kling官方API,根据参考图生成视频。”
  • “使用指定的voice_id生成英语朗读音频。”
  • “识别视频中的人脸,并为指定人脸同步音频与口型。”

注意事项

这是收费的外部API,需要KLING_API_KEY,认证和处理方式与fal.ai渠道不同。资料列出的语音合成语言为中文和英语,原则上必须明确指定voice_id。部分操作需要可访问的URL,例如Turbo的图像输入。费用估算的可信度较低,应据此看待估算结果。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确列出五个适用工具,并区分官方API与fal.ai。
步骤具体性步骤、输入输出和示例是否具体
A良好具体说明Classic和Turbo的状态、结果路径及两步口型同步流程。
安全性发送数据、删除文件、执行命令等是否有说明
A良好更换服务及多个人脸的选择需确认,并禁止静默上传。
安装难易度所需工具和 API 密钥是否少且有说明
B部分不足明确说明KLING_API_KEY和连接地址,但未提供OpenMontage安装步骤。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月23日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md9.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Kling Official Direct API

Use this skill for OpenMontage tools with provider="kling_official". This is not the fal.ai Kling gateway. Official Kling uses KLING_API_KEY, optional KLING_API_BASE_URL, and Authorization: Bearer <KLING_API_KEY>.

Provider Split

  • kling_video uses fal.ai, FAL_KEY, fal.ai queue URLs, and provider="kling".
  • kling_official_video uses Kling official API, KLING_API_KEY, official task protocols, and provider="kling_official".
  • kling_official_image uses the same official auth and task protocol for image generation.
  • kling_tts uses the official audio TTS endpoint and stays in the existing tts capability.
  • kling_avatar and kling_lip_sync use official avatar/lip-sync endpoints and stay in the existing avatar capability. They do not replace local talking_head or lip_sync.

Never silently switch between these paths. If the selected provider is unavailable, surface the blocker and ask before substituting.

Auth And Endpoint

Default base URL:

https://api-singapore.klingai.com

Users may override it with KLING_API_BASE_URL, for example for a regional endpoint. All requests send JSON and:

Authorization: Bearer <KLING_API_KEY>

Task Protocols

Classic APIs:

  • Create ID path: data.task_id
  • Statuses: submitted, processing, succeed, failed
  • Result paths: data.task_result.videos[], data.task_result.images[], data.task_result.audios[]

Turbo APIs:

  • Create ID path: data.id
  • Poll path: GET /tasks?task_ids=<id>
  • Statuses: submitted, processing, succeeded, failed
  • Result path: data[0].outputs[]

Keep the parsers separate. Do not write a fuzzy parser that guesses between task_id and id or between succeed and succeeded.

Omni References

Video Omni and Image Omni stay inside the existing provider tools through api_family="omni". Do not create selector-level Omni operations.

Video Omni accepts official reference structures:

  • image_list[] with image_url and optional type such as first_frame or end_frame.
  • video_list[] with video_url, official refer_type values such as feature or base, and optional keep_original_sound.
  • element_list[] with official element_id values.
  • Structured multi_prompt[]; do not split natural language into shots automatically.

Local image references may be normalized through tools/_kling/media.py. Local video paths must not be silently uploaded through fal.ai; ask for or require a reachable URL.

Image Omni accepts image_list[] with official image values. Prompt placeholders such as <<<image_1>>> must map stably to the provided image order. If the prompt already contains placeholders, validate that the referenced images exist and do not insert duplicates.

Capability Boundaries

TTS, avatar, and lip sync are provider additions to existing OpenMontage capabilities. Audio effects and video effects are official Kling endpoints, but they are not registered as default OpenMontage tools until a pipeline has a stable capability slot for them.

  • Do not add sound_effects or video_effects capabilities from inside a provider implementation.
  • Do not let video effects enter the ordinary video_generation selector path.
  • Do not disguise short sound effects as long background music unless a pipeline explicitly consumes that shape and the tool's best_for / not_good_for says so.

Video Parameters

Use operation for OpenMontage semantics:

  • text_to_video
  • image_to_video
  • reference_to_video

Use api_family for official protocol choice:

  • classic
  • turbo
  • omni

Important constraints:

  • Official video provider input schema must not expose top-level image_url; use reference_image_url or reference_image_path.
  • Classic image-to-video accepts reference_image_url or a local path converted to raw base64 in official field image.
  • Turbo image-to-video requires a URL first frame. Do not upload local files through fal.ai as a fallback.
  • Send aspect_ratio only where the current schema supports it: Classic text-to-video, Turbo text-to-video, and Video Omni.
  • Default paid path should avoid 4k, native sound, or batch behavior unless explicitly selected.

Image Parameters

Use api_family="generation" for /v1/images/generations and api_family="omni" for /v1/images/omni-image.

Generation/edit path:

  • prompt is required and should stay under the official 2500 character limit.
  • image_url passes through as official image.
  • image_path is converted to raw base64 and sent as official image.
  • image_reference can be subject or face.

Omni path:

  • Put references in image_list[] using official image values.
  • Use prompt placeholders such as <<<image_1>>> only when the prompt needs to bind a specific reference image.

TTS Parameters

kling_tts uses:

  • text
  • voice_id
  • voice_language, currently zh or en
  • voice_speed

Require an explicit voice_id unless an official account-specific default has been verified. Do not hard-code a made-up voice. Download every returned audio item, set data.output_path to the first local file, and include voice_id, voice_language, voice_speed, task_id, and non-zero cost_usd.

Avatar Parameters

kling_avatar uses /v1/videos/avatar/image2video and accepts:

  • avatar image via URL or local path converted to raw base64
  • audio_id or sound_file
  • optional prompt
  • mode, such as std or pro

Keep it separate from local talking_head. Pipelines that want Kling avatar output must list and choose it explicitly.

Lip Sync Parameters

kling_lip_sync has two steps:

  1. POST /v1/videos/identify-face with video_id or video_url; read faces from data.face_data[]
  2. POST /v1/videos/advanced-lip-sync with session_id and one face_choose[] item containing face_id, audio_id or sound_file, and the sound start/end/insert times

Local video paths must not be silently uploaded through fal.ai or any other provider. If multiple faces are returned and the user did not pass face_id or face_choose, stop and return the face list for confirmation unless auto_select_face=True was explicitly set. If auto-selecting, record the selection reason and selected face in the result/artifact.

Audio Effects And Video Effects

Official Kling audio effects (/v1/audio/text-to-audio, /v1/audio/video-to-audio) and video effects (/v1/videos/effects) are intentionally not default OpenMontage selector tools. Record the non-mapping reason in docs/tests instead of registering tools that current pipelines might misuse.

Elements Helper

Elements are an internal Kling Official helper, not a new OpenMontage tool capability. Use tools/_kling/elements.py to normalize element_list[].element_id, optionally query read-only element endpoints, and record element metadata when queried. Do not create or delete elements from the default provider path.

Account Usage Helper

Account Usage is diagnostic only. Use tools/_kling/account.py for low-frequency /account/costs checks, with local cache and throttle protection. Do not call it before every generation and do not put it in selectors or production pipeline stages.

For 1101 or 1102, surface that the account or resource pack is exhausted and include an account-usage diagnostic hint.

Callback Notes

Providers may accept callback_url, but polling remains the default execution mode.

  • Classic and Omni paths pass callback_url at the top level.
  • Turbo paths pass it as options.callback_url.
  • Successful results should record callback_requested=true, polling_used=true, the callback_url, and task_id.
  • Validate callback URLs before sending; only absolute http or https URLs should pass.

Error Handling

Surface official code, message, and request_id whenever available.

Do not retry:

  • Auth failures: 1000-1004
  • Balance/resource-pack exhaustion: 1101, 1102
  • Permission/model access: 1103
  • Parameter errors: 1200, 1201
  • Safety policy: 1301

Limited retry is acceptable for:

  • 1302 request too fast
  • 1303 concurrency/resource-pack slot limit
  • 5000, 5001, 5002 server/maintenance/backlog errors

For 1303, explain that the account hit a concurrency or resource-pack slot limit.

Cost Governance

Official Kling is a paid remote API. Provider tools must return non-zero conservative estimates from estimate_cost() and include cost_usd on successful paid results. Treat estimates as low-confidence until account usage reconciliation is implemented. High-cost Omni inputs such as multiple references, element IDs, result_type="series", mode="4k", and sound="on" must increase or flag the cost estimate.

Prompt Notes

For video, start from the universal OpenMontage video prompt skeleton: subject, subject motion, scene, spatial framing, and camera. Kling tends to respond well to clear temporal action order, camera movement verbs, and concise negative prompts. For reference workflows, state what should stay consistent from the reference and what should change.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

3d-asset-generation

免费有简介AI 评分 90分

从文字或图像生成3D模型,并与目录素材搭配使用。在Blender中检查形状、材质、大小和接地情况,记录生成条件、来源及费用,再将素材加入场景。

  • 根据文字生成独特的3D道具
  • 将概念图中的物体转为3D模型
  • 用目录中的植被和岩石填充背景
calesthio/OpenMontage7.1万2026年10月17日 更新

acestep

免费有简介AI 评分 80分

使用ACE-Step 1.5生成视频背景音乐和带歌词的歌曲,可指定曲风、时长、速度与调性,也支持改编参考音频,以及从混合音频中分离人声或乐器。

  • 制作适合视频场景的背景音乐
  • 制作带歌词的短广告曲
  • 将参考音频改编为爵士风格
calesthio/OpenMontage7.1万2026年10月17日 更新

agents

免费有简介AI 评分 80分

使用ElevenLabs创建语音对话助手或角色,配置声音、应答规则、语言模型及外部工具,支持嵌入网站,并通过Twilio集成设置电话外呼。

  • 创建回答咨询的语音机器人
  • 在网站中嵌入语音引导
  • 制作可对话的语音角色原型
calesthio/OpenMontage7.1万2026年10月17日 更新

ai-video-gen

免费有简介AI 评分 90分

根据文字描述或参考图片生成AI视频,并按用途和费用选择生成服务。支持设置画面比例、查看生成进度,以及通过Gemini Omni对话修改现有视频。

  • 将文字描述的场景制作成视频
  • 为商品照片添加动态效果
  • 制作社交媒体竖屏视频
calesthio/OpenMontage7.1万2026年10月17日 更新

ai-video-gen

免费有简介AI 评分 70分

根据文字或参考图像生成AI视频,并按用途、可用服务和预算选择模型。可制作社交平台竖屏短片、让商品照片动起来,也可通过对话编辑已有片段。

  • 制作社交平台竖屏短片
  • 为商品照片添加动态效果
  • 按预算和风格选择生成服务
calesthio/OpenMontage7.1万2026年10月17日 更新

atlas-cloud

免费有简介AI 评分 90分

通过Atlas Cloud使用多种模型生成和编辑图像与视频,只需一个API密钥,即可保存生成素材,以及所用模型、提交设置和预估费用等记录。

  • 通过同一服务生成图像和视频
  • 利用参考素材编辑商品图
  • 参考图像、视频和音频生成视频
calesthio/OpenMontage7.1万2026年10月17日 更新

查看 calesthio 的全部技能

报告此技能的问题