{"openapi":"3.0.2","info":{"title":"kling/videos-lip-sync","description":"The request body Comfy Router accepts for the model \"kling/videos-lip-sync\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"c3318eea8786"},"paths":{"/v2/models/kling/videos-lip-sync":{"post":{"operationId":"runRouterModel","summary":"Run kling/videos-lip-sync synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Generate lip-sync for a video_id or video_url. Use text2video with text and voice_id, or audio2video with an audio_file or audio_url.","example":{"input":{"mode":"text2video","text":"Welcome to Comfy Cloud.","video_id":"kling-video-6f5e4d3c2b1a","voice_id":"genshin_vindi2","voice_language":"en","voice_speed":1}},"properties":{"callback_url":{"description":"The callback notification address. Server will notify when the task status changes. Ignored: comfy-api drops this field before forwarding; Comfy Router polls on your behalf.","format":"uri","type":"string"},"input":{"$ref":"#/components/schemas/KlingLipSyncInputObject"}},"required":["input"],"type":"object"}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/KlingLipSyncResponse"}],"description":"Comfy Router output schema for Kling lip-sync: the terminal `GET /v1/videos/lip-sync/{id}` task-query document, forwarded unchanged. The operation is SUBMIT-AND-POLL, polled on `\u003csubmit path\u003e/:id`: Router submits the task and then polls on the caller's behalf, so the body a caller receives is the finished task rather than the `{code, message, request_id, data.task_id}` handle the underlying `/proxy/kling/v1/videos/lip-sync` submit answers with.\nThe generated video's download URL is at `data.task_result.videos[].url`. Read the ELEMENT field, not the `videos` container: `KlingVideoResult` is `{id, url, watermark_url, duration}`, so a one-element list carrying an id and a duration and no URL is a non-empty array holding nothing playable. `data.task_result.videos[].watermark_url` is the same asset under Kling's hotlink-protection form and counts as a result; Router draws exactly that line for this operation as it does for the eleven generation ids, and a `succeed` carrying neither is `success_without_output` rather than a finished generation.\n`data.task_status` is Kling's own four-value vocabulary — `submitted`, `processing`, `succeed`, `failed` — and the terminal success spells it `succeed`, NOT `succeeded`. The `kling/kling-3.0-turbo` sibling (`KlingV2RouterOutput`) says `succeeded` and carries an entirely different document; the two vocabularies are deliberately not folded together.\nThe ENVELOPE is NARROWER than the one the eleven Kling v1 generation ids and `kling/videos-avatar-image2video` answer (`KlingVideoRouterOutput`), and that is the whole reason this is its own component: it is bound to `KlingLipSyncResponse`, the response type the v1 lip-sync operation declares, and that type declares no `data.task_status_msg` and no `data.watermark_info`, so this document does not publish them and a client generated from it carries no typed field for either. `data.final_unit_deduction` IS declared: the route returns it and Router meters the generation off it. Everything else is the same envelope and the same `data.task_result.videos[]` leaf as the wider component, and Router reads the finished task on one rule for both: nothing that rule touches is among the fields that differ.","example":{"code":0,"data":{"created_at":1798761600000,"final_unit_deduction":"1.00","task_id":"kling-lip-sync-task-4f3e2d1c0b9a","task_result":{"videos":[{"duration":"8","id":"kling-video-9a8b7c6d5e4f","url":"https://example.invalid/kling/videos-lip-sync/generated.mp4"}]},"task_status":"succeed","updated_at":1798761780000},"message":"SUCCEED","request_id":"5e0a9b17-6d3c-42f8-91b4-7a2c8d6e0f35"}}}}}}}}},"components":{"schemas":{"KlingAudioUploadType":{"description":"Method of Transmitting Audio Files for Lip-Sync. Required when mode is audio2video.","enum":["file","url"],"type":"string"},"KlingLipSyncInputObject":{"anyOf":[{"properties":{"mode":{"enum":["text2video"]}},"required":["video_id","text","voice_id"]},{"properties":{"mode":{"enum":["audio2video"]}},"required":["video_id","audio_file"]},{"properties":{"mode":{"enum":["audio2video"]}},"required":["video_id","audio_url"]},{"properties":{"mode":{"enum":["text2video"]}},"required":["video_url","text","voice_id"]},{"properties":{"mode":{"enum":["audio2video"]}},"required":["video_url","audio_file"]},{"properties":{"mode":{"enum":["audio2video"]}},"required":["video_url","audio_url"]}],"properties":{"audio_file":{"description":"Local Path of Audio File. Supported formats: .mp3/.wav/.m4a/.aac, maximum file size of 5MB. Base64 code.","type":"string"},"audio_type":{"$ref":"#/components/schemas/KlingAudioUploadType"},"audio_url":{"description":"Audio File Download URL. Supported formats: .mp3/.wav/.m4a/.aac, maximum file size of 5MB.","type":"string"},"mode":{"$ref":"#/components/schemas/KlingLipSyncMode"},"text":{"description":"Text Content for Lip-Sync Video Generation. Required when mode is text2video. Maximum length is 120 characters.","maxLength":120,"type":"string"},"video_id":{"description":"The ID of the video generated by Kling AI. Only supports 5-second and 10-second videos generated within the last 30 days.","type":"string"},"video_url":{"description":"Get link for uploaded video. Video files support .mp4/.mov, file size does not exceed 100MB, video length between 2-10s.","type":"string"},"voice_id":{"description":"Voice ID. Required when mode is text2video. The system offers a variety of voice options to choose from.","type":"string"},"voice_language":{"$ref":"#/components/schemas/KlingLipSyncVoiceLanguage"},"voice_speed":{"default":1,"description":"Speech Rate. Valid range: 0.8~2.0, accurate to one decimal place.","maximum":2,"minimum":0.8,"type":"number"}},"required":["mode"],"type":"object"},"KlingLipSyncMode":{"description":"Video Generation Mode. text2video: Text-to-video generation mode; audio2video: Audio-to-video generation mode","enum":["text2video","audio2video"],"type":"string"},"KlingLipSyncResponse":{"properties":{"code":{"description":"Error code","type":"integer"},"data":{"properties":{"created_at":{"description":"Task creation time","type":"integer"},"final_unit_deduction":{"description":"The deduction units of task","type":"string"},"task_id":{"description":"Task ID","type":"string"},"task_info":{"properties":{"external_task_id":{"type":"string"}},"type":"object"},"task_result":{"properties":{"videos":{"items":{"$ref":"#/components/schemas/KlingVideoResult"},"type":"array"}},"type":"object"},"task_status":{"$ref":"#/components/schemas/KlingTaskStatus"},"updated_at":{"description":"Task update time","type":"integer"}},"type":"object"},"message":{"description":"Error message","type":"string"},"request_id":{"description":"Request ID","type":"string"}},"type":"object"},"KlingLipSyncVoiceLanguage":{"default":"en","description":"The voice language corresponds to the Voice ID.","enum":["zh","en"],"type":"string"},"KlingTaskStatus":{"description":"Task Status","enum":["submitted","processing","succeed","failed"],"type":"string"},"KlingVideoResult":{"properties":{"duration":{"description":"Total video duration in seconds","type":"string"},"id":{"description":"Generated video ID","type":"string"},"url":{"description":"URL for generated video","format":"uri","type":"string"},"watermark_url":{"description":"URL for generated video with watermark, hotlink protection format","format":"uri","type":"string"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"kling/videos-lip-sync","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["video","audio"],"x-comfy-router-output-modalities":["video"]}
