Skip to main content

Digital Human Video

In this page's examples, {BASE_URL} is https://api.uniall.ai.

Overview

Kling digital-human video uses the stable kling-v3 model with operation: avatar. Provide one public image and either an audio URL or a UniAll voice_id; do not use the historical Kling Avatar tier model IDs.

UniAll does not currently expose Kling subject-library creation or query endpoints. Do not pass subject_ids as a regular public parameter.

When To Use It

  • Use audio_url when narration audio already exists.
  • Use voice_id when the task should use a voice returned by the UniAll voice list or clone endpoint.
  • Use resolution: std for the standard quality tier or resolution: pro for the higher quality tier.

Endpoint

ActionMethodPath
Create a digital-human video taskPOST/v1/videos
Query a video taskGET/v1/videos/{task_id}
Download a completed videoGET/v1/videos/{task_id}/content
List Kling voicesGET/v1/audio/voices?model=kling-v3
Clone a Kling voicePOST/v1/audio/voices/clone

Authentication

Authorization: Bearer sk-***
Content-Type: application/json

Request Parameters

ParameterTypeRequiredDescription
modelstringYesUse kling-v3.
operationstringYesUse avatar.
promptstringYesPresentation, expression, and camera guidance required by the UniAll video interface.
imagestringYesPublic HTTP(S) image URL for the presenter.
audio_urlstringConditionalPublic narration-audio URL. Use exactly one of audio_url or voice_id.
voice_idstringConditionalUniAll voice ID. Use exactly one of voice_id or audio_url.
resolutionstringNostd or pro; default std.
watermarkbooleanNoWhether to add an AIGC watermark.

Do not pass a sound switch. audio_url and voice_id are lip-sync inputs, and the prompt describes the intended presentation style. Do not pass both voice inputs in one request.

List Available Voices

curl "{BASE_URL}/v1/audio/voices?model=kling-v3" \
-H "Authorization: Bearer sk-***"

Use the UniAll voice_id returned by the list response. Do not pass an upstream voice ID.

Clone A Voice

curl -X POST "{BASE_URL}/v1/audio/voices/clone" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3",
"voice_name": "Product narrator",
"audio_url": "https://example.com/voice-sample.mp3",
"text": "This is the preview text for the cloned voice."
}'

Save the UniAll voice_id returned by a successful clone request, then pass it to the avatar task.

Request Examples

Use An Audio URL

curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3",
"operation": "avatar",
"prompt": "A friendly presenter explains the product naturally in a stable front-facing shot.",
"image": "https://example.com/presenter.png",
"audio_url": "https://example.com/speech.mp3",
"resolution": "pro",
"watermark": false
}'

Use A UniAll Voice

curl -X POST "{BASE_URL}/v1/videos" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v3",
"operation": "avatar",
"prompt": "A professional presenter delivers the narration with natural expression and a stable front-facing camera.",
"image": "https://example.com/presenter.png",
"voice_id": "voice_xxxxxxxxxxxxx",
"resolution": "std"
}'

Response Example

{
"id": "task_xxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "kling-v3",
"status": "queued",
"progress": 0
}

Task Status And Result

Save id or task_id, then follow Video Generation Overview for the shared 3-to-10-second polling interval, terminal statuses, result fields, error contract, and authenticated download flow.

Billing Notes

Digital-human video billing normally depends on kling-v3, operation: avatar, resolution, and the output duration. Voice cloning may be billed separately according to the current model catalog. Task submission may reserve balance; the final task settlement and consumption records are authoritative.

Common Errors

  • Using a historical digital-human tier model ID instead of kling-v3.
  • Omitting operation: avatar or the required prompt.
  • Passing both audio_url and voice_id, or passing neither.
  • Passing an upstream voice ID instead of a UniAll voice_id.
  • Passing subject_ids even though the public subject-library API is not available.
  • Passing sound, duration, or media URLs that the service cannot access publicly.
  • Resubmitting a paid task after one polling request times out instead of continuing to query the original task_id.

Public responses do not expose provider names, upstream task IDs, routes, credentials, or raw upstream requests.