The short answer: HopBase offers two digital-human pipelines via the Kling API. kling-avatar turns 1-5 photos of a person plus one audio clip (extra.sound_file or extra.audio_id) into a talking-head video whose duration follows the audio; kling-lip-sync re-voices existing footage by running face detection on /v1/kling/faces first, then submitting the lip-sync task with the returned session and exactly one face_choose item. Both are submitted to /v1/video/generate and polled by task ID until the status reads completed or failed; finished videos come back as HopBase-hosted URLs you should copy to your own storage. Asset URLs must be publicly downloadable. Billing is per second, with a 5-second minimum for lip-sync and face detection billed per call, and you are charged only when Kling confirms success with a valid output β failed, rejected or interrupted tasks cost nothing. Live pricing is on the pricing page.
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-hosted 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 by Kling β 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: per second, and failures cost nothing
Official list reference points: kling-avatar at $0.0588/s (720p) and $0.1176/s (1080p), kling-lip-sync at $0.0147/s (face detection billed separately per call); HopBase pricing for your plan is shown on the pricing page and quoted by our advisors. Exact avatar/lip-sync bucket rates follow the model catalog. The billing rule is production-friendly: a charge is generated only when Kling 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 audio from any TTS engine works.
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.