# Digital Human Video This file is the focused AI-readable context for one UniAll documentation page. URL: https://docs.uniall.ai/models/avatar/digital-human Locale: en Markdown: https://docs.uniall.ai/ai/pages/models/avatar/digital-human.md Description: Kling Avatar v2 digital human source documentation. Agent guidance: - Use this page when the user is asking about this specific route or model capability. - Preserve endpoint paths, JSON keys, model IDs, and placeholder values exactly. - Treat examples such as `sk-***`, `{BASE_URL}`, and `task_xxx` as safe placeholders, not real secrets. ## Page Markdown This document explains how to use Kling Avatar v2 async digital human video generationEndpoint. Supported models: | Model name | Type | Suitable scenarios | Billing mode | |---|---|---|---| | `kling-avatar-v2-standard` | digital human video | standard narration, customer-service explanation, course introduction, marketing short video | billed by output video duration | | `kling-avatar-v2-pro` | digital human video | higher-quality digital-human narration, formal promotional video, brand video, important course content | billed by output video duration | Endpoint async task mode: | Operation | Method | Path | |---|---|---| | submitdigital human videotask | `POST`|`/v1/video/generations` | | querydigital human videotask | `GET`|`/v1/video/generations/{task_id}` | --- ## 1. Authentication Endpoint requires request headers API Key: ```http Authorization: Bearer sk-xxxxxxxxxxxxxxxx Content-Type: application/json ``` Example: ```uri https://api.xxx.xx ``` --- ## 2. Model overview Kling Avatar v2 imageandaudio generationdigital human video. userrequiresprovidesone imageandaaudio, Model generation and action video. supports: | Model | Note | |---|---| | `kling-avatar-v2-standard` | standard, standard narrationand generation | | `kling-avatar-v2-pro` | Pro, stable | --- ## 3. submitdigital human videotask ```http POST https://api.xxx.xx/v1/video/generations ``` ### 3.1 Request Parameters | Parameters | Type | Required | Note | |---|---|---|---| | `model`| string | Yes |`kling-avatar-v2-standard` or `kling-avatar-v2-pro` | | `image_url` | string | Yes | image URL | | `audio_url` | string | Yes | audio URL, | | `audio_duration_seconds` | number | Yes | audioduration, submit billing | | `prompt` | string | No | style, scenario, Status, camera | Note: - `audio_duration_seconds` pass. - Field submit, billing. - pass inaudio duration, cost and task. ### 3.2 submitResponse Examples ```json { "id": "task_xxxxxxxxxxxxx", "task_id": "task_xxxxxxxxxxxxx", "object": "video.generation.job", "status": "queued" } ``` Field Reference: | Field | Note | |---|---| | `id`/`task_id` | async task ID, query result | | `status`| task status, value `queued`, `processing`, `completed`, `failed` | --- ## 4. querydigital human videotask ```http GET https://api.xxx.xx/v1/video/generations/{task_id} ``` queryExample: ```bash curl -X GET "https://api.xxx.xx/v1/video/generations/task_xxxxxxxxxxxxx" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" ``` Completed Response Example: ```json { "id": "task_xxxxxxxxxxxxx", "task_id": "task_xxxxxxxxxxxxx", "object": "video.generation.job", "status": "completed", "video_url": "https://api.xxx.xx/media/xxxxx.mp4", "result": { "outputs": [ "https://api.xxx.xx/media/xxxxx.mp4" ] } } ``` --- ## 5. Request Examples ### 5.1 Standard generationcustomer-service explanationvideo ```bash curl -X POST "https://api.xxx.xx/v1/video/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"model": "kling-avatar-v2-standard", "image_url": "https://cdn.example.com/avatar/customer-service.png", "audio_url": "https://cdn.example.com/audio/customer-intro.mp3", "audio_duration_seconds": 12, "prompt": "friendly customer service presenter, natural expression, clean studio lighting"}' ``` ### 5.2 Standard generationcourse introduction ```bash curl -X POST "https://api.xxx.xx/v1/video/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"model": "kling-avatar-v2-standard", "image_url": "https://cdn.example.com/avatar/teacher.png", "audio_url": "https://cdn.example.com/audio/course-opening.mp3", "audio_duration_seconds": 18.5, "prompt": "professional teacher, warm smile, stable camera, natural lip sync"}' ``` ### 5.3 Pro generation video ```bash curl -X POST "https://api.xxx.xx/v1/video/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"model": "kling-avatar-v2-pro", "image_url": "https://cdn.example.com/avatar/brand-host.png", "audio_url": "https://cdn.example.com/audio/brand-message.mp3", "audio_duration_seconds": 24, "prompt": "premium corporate spokesperson video, clean studio background, confident expression"}' ``` ### 5.4 Pro generationnews broadcast ```bash curl -X POST "https://api.xxx.xx/v1/video/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"model": "kling-avatar-v2-pro", "image_url": "https://cdn.example.com/avatar/news-anchor.png", "audio_url": "https://cdn.example.com/audio/news-briefing.mp3", "audio_duration_seconds": 32.7, "prompt": "news anchor style, formal tone, stable frontal shot, neutral expression"}' ``` --- ## 6. Common Errors ### 6.1 image_url digital human video provides image: ```json { "image_url": "https://cdn.example.com/avatar.png" } ``` ### 6.2 audio_url digital human video provides audio: ```json { "audio_url": "https://cdn.example.com/voice.mp3" } ``` ### 6.3 audio_duration_seconds Error: ```json { "model": "kling-avatar-v2-standard", "image_url": "https://cdn.example.com/avatar.png", "audio_url": "https://cdn.example.com/voice.mp3" } ``` audioduration: ```json { "audio_duration_seconds": 12.5 } ``` --- ## 7. recommended 1. image. 2. use TTS or generate aaudio. 3. audio duration. 4. submit `/v1/video/generations`, pass in `image_url`, `audio_url`, `audio_duration_seconds`. 5. poll `/v1/video/generations/{task_id}`. 6. task completed read `video_url`. --- ## 8. Minimum Valid Request ### 8.1 Avatar Standard ```bash curl -X POST "https://api.xxx.xx/v1/video/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"model": "kling-avatar-v2-standard", "image_url": "https://cdn.example.com/avatar.png", "audio_url": "https://cdn.example.com/voice.mp3", "audio_duration_seconds": 10}' ``` ### 8.2 Avatar Pro ```bash curl -X POST "https://api.xxx.xx/v1/video/generations" \ -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \ -H "Content-Type: application/json" \ -d '{"model": "kling-avatar-v2-pro", "image_url": "https://cdn.example.com/avatar.png", "audio_url": "https://cdn.example.com/voice.mp3", "audio_duration_seconds": 10}' ```