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_urlwhen narration audio already exists. - Use
voice_idwhen the task should use a voice returned by the UniAll voice list or clone endpoint. - Use
resolution: stdfor the standard quality tier orresolution: profor the higher quality tier.
Endpoint
| Action | Method | Path |
|---|---|---|
| Create a digital-human video task | POST | /v1/videos |
| Query a video task | GET | /v1/videos/{task_id} |
| Download a completed video | GET | /v1/videos/{task_id}/content |
| List Kling voices | GET | /v1/audio/voices?model=kling-v3 |
| Clone a Kling voice | POST | /v1/audio/voices/clone |
Authentication
Authorization: Bearer sk-***
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Use kling-v3. |
operation | string | Yes | Use avatar. |
prompt | string | Yes | Presentation, expression, and camera guidance required by the UniAll video interface. |
image | string | Yes | Public HTTP(S) image URL for the presenter. |
audio_url | string | Conditional | Public narration-audio URL. Use exactly one of audio_url or voice_id. |
voice_id | string | Conditional | UniAll voice ID. Use exactly one of voice_id or audio_url. |
resolution | string | No | std or pro; default std. |
watermark | boolean | No | Whether 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: avataror the requiredprompt. - Passing both
audio_urlandvoice_id, or passing neither. - Passing an upstream voice ID instead of a UniAll
voice_id. - Passing
subject_idseven 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.