calesthio/OpenMontage · error · ValueError
Kling identify_face requires video_id or video_url
Error message
Kling identify_face requires video_id or video_url
What it means
ValueError from _build_identify_request when the payload ends up empty: neither video_id nor video_url was provided (and no video_path trigger from the sibling guard). Face identification operates on an existing video, so exactly one of these references is required.
Source
Thrown at tools/avatar/kling_lip_sync.py:357
**self._callback_result_data(inputs, task_id),
**probed,
},
artifacts=[str(path) for path in paths],
cost_usd=self.estimate_cost(inputs),
duration_seconds=round(time.time() - start, 2),
model="kling-official-lip-sync",
)
def _build_identify_request(self, inputs: dict[str, Any]) -> dict[str, Any]:
if inputs.get("video_path") and not (inputs.get("video_url") or inputs.get("video_id")):
raise ValueError("Kling identify_face requires video_url or video_id; local video paths cannot be silently uploaded.")
payload: dict[str, Any] = {}
if inputs.get("video_id"):
payload["video_id"] = str(inputs["video_id"])
if inputs.get("video_url"):
payload["video_url"] = str(inputs["video_url"])
if not payload:
raise ValueError("Kling identify_face requires video_id or video_url")
return {
"path": "/v1/videos/identify-face",
"payload": payload,
"operation": "identify_face",
}
def _build_advanced_request(self, inputs: dict[str, Any]) -> dict[str, Any]:
session_id = str(inputs.get("session_id") or "").strip()
if not session_id:
raise ValueError("advanced_lip_sync requires session_id")
face_choose = self._normalize_face_choose(inputs)
if not face_choose:
raise ValueError("advanced_lip_sync requires face_choose or face_id")
if len(face_choose) != 1:
raise ValueError("advanced_lip_sync currently supports exactly one face_choose item")
face_item = face_choose[0]
audio_source = self._copy_audio_input(inputs, face_item)
self._copy_timing_fields(inputs, face_item)View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Pass video_id (from a prior Kling upload) or video_url (public HTTPS URL) in the inputs.
- If the video is local, see the explicit-upload requirement (upload first — do not use video_path).
- Log the inputs dict before calling to confirm which keys are actually present.
Example fix
// before
result = tool.run({"operation": "identify_face"})
// after
result = tool.run({"operation": "identify_face", "video_url": "https://cdn.example.com/clip.mp4"}) Defensive patterns
Strategy: validation
Validate before calling
assert inputs.get("video_id") or inputs.get("video_url"), \
"identify_face requires video_id or video_url (upload local files first)" Prevention
- Make the video reference a required field in wrapper schemas
- Log the input keys before calling to catch dynamically-built dicts missing the video field
When it happens
Trigger: Calling kling_lip_sync operation='identify_face' with no video reference at all; passing video under an unrecognized key (e.g. 'file' or 'source').
Common situations: Input dict built dynamically and the video field never got set; key-name confusion between tools.
Related errors
- Kling avatar requires image_url or image_path
- Kling avatar requires audio_id, sound_file, sound_file_url,
- Kling identify_face requires video_url or video_id; local vi
- advanced_lip_sync requires session_id
- advanced_lip_sync requires face_choose or face_id
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/75ec06327f983cea.
Report an issue: GitHub.