The short answer: HopBase offers two digital-human pipelines via the Kling API — kling-avatar turns 1-5 photos of a person plus an audio clip into a talking-head video (duration follows the audio), and kling-lip-sync re-voices existing footage (face detection first, then the lip-sync task). All Kling models run at 25% off the official list price, and failed tasks are never billed. Here is the full copy-paste walkthrough.
Which pipeline do you need
| kling-avatar | kling-lip-sync | |
|---|---|---|
| Input | 1-5 photos + audio | Existing video + new audio |
| Typical use | Talking-head from scratch: product explainers, knowledge channels | Localization: translated dubs, batch copy swaps |
| Duration | Follows the input audio | Follows the source, billed per second, 5s minimum |
| Billing bucket | avatar_<resolution>, per second | lip_sync per second (face detection billed per call) |
Pipeline A: photos to talking head (kling-avatar)
Submit the task. Provide 1-5 person images; the audio goes in exactly one of extra.sound_file (public HTTP(S) URL) or extra.audio_id; omit duration — the audio decides it:
curl https://api.hop-base.com/v1/video/generate \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-avatar",
"images": [{"url": "https://cdn.example.com/host.png"}],
"extra": {"sound_file": "https://cdn.example.com/voice.mp3"}
}'The 202 response returns a task ID like kt57x…. Poll it:
curl https://api.hop-base.com/v1/video/tasks/kt57xYOUR_TASK_ID \
-H "Authorization: Bearer sk-YOUR_KEY"Status runs queued → processing → completed / failed; on completion, outputs holds a HopBase relay URL that plays directly in the browser — transfer it to your own storage promptly.
Three common pitfalls: asset urls must be publicly downloadable (intranet, relative, or credentialed URLs are rejected synchronously); each asset item takes exactly one of url or file_id; and asset content (resolution/format/size) is validated asynchronously upstream — a non-compliant asset fails minutes after submission, but failures are never billed.
Pipeline B: re-voice existing footage (kling-lip-sync)
Run face detection on the source video first (billed per call):
curl https://api.hop-base.com/v1/kling/faces \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"videos":[{"url":"https://cdn.example.com/source.mp4"}]}'Then submit the lip-sync task with the returned session — face_choose must contain exactly one item with a non-empty face_id and sound_file:
curl https://api.hop-base.com/v1/video/generate \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-lip-sync",
"extra": {
"session_id": "face-session-id",
"face_choose": [{"face_id": "face-1", "sound_file": "https://cdn.example.com/voice-en.mp3"}]
}
}'Lip-sync bills per second with a 5-second minimum (a 4s result is charged as 5s). Voice selection (voice_ids / extra.voice_list) is not yet available — do not send those fields.
Billing: 25% off, and failures cost nothing
Kling through HopBase runs at 25% off official list across the board — reference points: kling-v3-omni 720p silent at ¥0.45/s (list ¥0.60), 1080p with audio at ¥0.75/s (list ¥1.00). Exact avatar/lip-sync bucket rates follow the model catalog. The billing rule is production-friendly: a charge is generated only when the upstream confirms success with a valid output and billable duration — queue failures, content rejections, and interrupted generations cost nothing. Full rates on the pricing page.
Commercial patterns
E-commerce host matrix: one set of host photos plus batch product-explainer audio, looped through avatar — a full SKU catalog overnight. Localization: one master video plus translated dubs through lip-sync turns one asset into N languages. Digital employees: a fixed persona with weekly scripts removes the filming step entirely. Pair with Seedance scene clips for a complete video pipeline behind one API key.
FAQ
Can I pick a voice? Not yet — the audio content is entirely your uploaded sound_file, so any TTS works upstream of it.
Where do I start? Register and create a key in the console (a Kling-enabled group is required); the full request contract is in the Kling docs, and run GET /v1/models first to confirm the model IDs your key can use.