The botanist speaks gently in Mandarin, making one small open-hand gesture toward the new leaves. Her patient expression becomes a warm smile after the pause. Accurate lip sync, natural blinking, stable identity and hands. Locked camera, no cuts.
Kling Avatar 2.0 Standard API
kwaivgi/kling-video/ai-avatar/v2/standardKling Avatar 2.0 Standard turns a single character portrait and driving audio into tightly synchronized talking-avatar video, with natural lip alignment, facial micro-expressions, and prompt-guided performance cues. It preserves facial identity and framing across the full generation cycle while delivering lively, coherent speaking posture and head motion.
Drag and drop files, paste from clipboard, or provide a URL.
1/1 files added
Drag and drop files, paste from clipboard, or provide a URL.
1/1 files added
Examples
REST API
Quick Start
Authenticate, submit a valid input object, then use task_id to retrieve the video.
Connect to the Vidgo API
Create an API key, keep it only on your server, and send Authorization: Bearer VIDGO_API_KEY.
- Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Authentication
- Authorization: Bearer VIDGO_API_KEY
Submit one generation task
Replace the example URLs with publicly accessible media, then submit using model kwaivgi/kling-video/ai-avatar/v2/standard.
REQUEST_BODY=$(cat <<'JSON'
{
"model": "kwaivgi/kling-video/ai-avatar/v2/standard",
"input": {
"image_urls": [
"https://cdn.vidgo.ai/apis/models/kwaivgi/kling-video/ai-avatar/v2/standard/v1/01/input.png"
],
"audio_url": "https://cdn.vidgo.ai/apis/models/kwaivgi/kling-video/ai-avatar/v2/standard/v1/01/audio.mp3",
"prompt": "The botanist speaks gently in Mandarin, making one small open-hand gesture toward the new leaves. Her patient expression becomes a warm smile after the pause. Accurate lip sync, natural blinking, stable identity and hands. Locked camera, no cuts."
}
}
JSON
)
RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
CODE=$(printf '%s' "$RESPONSE" | jq -r '.code // empty')
if [ "$CODE" != "0" ] && [ "$CODE" != "200" ]; then
printf 'API error: %s
' "$RESPONSE" >&2
exit 1
fi
printf '%s
' "$RESPONSE"Wait for the result
Query with task_id, continue for not_started/running, and stop for finished/failed. On success, read data.files[].file_url.
Track status
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll about every 2 seconds, then back off gradually. Continue only for not_started or running and stop on finished or failed. You can instead add callback_url to the same top-level request contract.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "KRM43WEB62XRAMHB",
"status": "running",
"created_time": "2026-09-21T11:49:44"
}
}{
"code": 200,
"data": {
"task_id": "task-unified-...",
"status": "finished",
"files": [
{
"file_url": "https://storage.vidgo.ai/generated/video.mp4",
"file_type": "video"
}
],
"created_time": "2026-08-22T10:00:00Z",
"progress": 100,
"error_message": null
}
}Complete runnable example
Expand for a complete script with HTTP and business-code checks, task_id validation, polling, terminal-state handling, and a timeout boundary.
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "kwaivgi/kling-video/ai-avatar/v2/standard",
"input": {
"image_urls": [
"https://cdn.vidgo.ai/apis/models/kwaivgi/kling-video/ai-avatar/v2/standard/v1/01/input.png"
],
"audio_url": "https://cdn.vidgo.ai/apis/models/kwaivgi/kling-video/ai-avatar/v2/standard/v1/01/audio.mp3",
"prompt": "The botanist speaks gently in Mandarin, making one small open-hand gesture toward the new leaves. Her patient expression becomes a warm smile after the pause. Accurate lip sync, natural blinking, stable identity and hands. Locked camera, no cuts."
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
BUSINESS_CODE=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Submit failed:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
START_TIME=$(date +%s)
POLL_DELAY=2
while true; do
if [ $(( $(date +%s) - START_TIME )) -ge 600 ]; then
printf 'Timed out after 600 seconds
' >&2
exit 1
fi
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
BUSINESS_CODE=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.code // empty')
if [ "$BUSINESS_CODE" != "0" ] && [ "$BUSINESS_CODE" != "200" ]; then
printf 'Status request failed:
%s
' "$STATUS_RESPONSE" >&2
exit 1
fi
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep "$POLL_DELAY"
if [ "$POLL_DELAY" -lt 10 ]; then POLL_DELAY=$((POLL_DELAY + 1)); fi
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneInput parameters
These are the fields accepted inside input. The request example shows the required top-level model field.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| image_urls | array<string> | Required | — | Exactly one image: public HTTP(S) URL, image Data URI, or raw Base64. |
| audio_url | string | Required | — | Audio must be 2–60 seconds and at most 5 MiB. The server detects its duration. |
| prompt | string | null | Optional | — | Optional text, up to 2,500 characters; surrounding whitespace is trimmed. Empty or null values are omitted. |
Response Fields
Submission returns task identity immediately. Status responses add progress, every output file, or a failure message.
| Field | Type | Description |
|---|---|---|
| code | integer | Application result code; successful responses use 0 or 200. |
| message | string | Human-readable message or error detail when present. |
| data.task_id | string | Task ID used in the status endpoint path. |
| data.status | string | not_started, running, finished, or failed. |
| data.created_time | string | Task creation time in date-time format. |
| data.progress | integer | 0–100 progress when reported by the provider. |
| data.files[] | array | All output files from a successful task, in response order. |
| data.files[].file_url | string | Public URL for a generated video. |
| data.files[].file_type | string | File type, such as video. |
| data.error_message | string | null | Failure detail when status is failed. |
Task Lifecycle
Treat not_started and running as non-terminal states. finished and failed are terminal alternatives; stop polling when either is returned.
not_startedThe task was accepted and is waiting to begin.
runningGeneration is in progress. Continue polling the same task_id.
finishedGeneration succeeded. Read every video URL from data.files[].file_url.
failedGeneration stopped with an error. Read data.error_message and stop polling.
Polling and Errors
- AuthenticationA 401 response means the Bearer API key is missing or invalid. Correct it before retrying.
- ValidationA 400 response identifies an invalid field, unsupported media key, or insufficient credit balance. Correct the request before resubmitting.
- Network and timeoutA transport failure is different from a failed task. Retry status checks with a bounded timeout before deciding that the task failed.
- Polling intervalStart around every 2 seconds and increase the interval gradually for a long-running task.
- Terminal statesContinue only for not_started or running. Stop immediately on finished or failed.
- Callback optionProvide callback_url at the request top level to receive the final flat task object; polling remains available if delivery fails.
Endpoint limits
| Specification | Value | Details |
|---|---|---|
| Input | 1 image + 1 audio | Optional text, up to 2,500 characters; surrounding whitespace is trimmed. Empty or null values are omitted. |
| Audio limits | 2–60s / 5 MiB | Audio must be 2–60 seconds and at most 5 MiB. The server detects its duration. |
| Pricing | 7 credits/sec ($0.035/s) | Final charge uses the server-detected audio duration, rounded up to a whole second. |
Related models
Kling Avatar 2.0 Standard API frequently asked questions
What is the Kling Avatar 2.0 Standard API?
Kling Avatar 2.0 Standard is a Kuaishou Technology (Kling AI) model for talking-avatar video generation from a character portrait and driving audio. It produces lip-synced digital-human clips with natural micro-expressions, identity preservation, and optional performance prompts at a cost-efficient 7 credits per second. Built on multimodal grounding with cross-attention audio-visual alignment, it keeps facial features and composition stable while animating speech, gaze, and head motion. You can call it programmatically or try it from the playground above.
Does Kling Avatar 2.0 Standard deliver precise lip-sync?
Yes. Mouth shapes follow the timing of the driving audio, including fast dialogue and multilingual speech, so the finished clip reads as a synchronized talking head.
Can Kling Avatar 2.0 Standard add natural micro-expressions?
Yes. Beyond lip motion, the model animates subtle eye, brow, and cheek responses that track speech energy while the source face stays recognizable.
How do Kling Avatar 2.0 Standard performance prompts work?
Provide an optional prompt to steer emotion, gesture cues, or speaking stance. Keep the prompt focused on one primary action so it complements the audio timing.
What audio duration does Kling Avatar 2.0 Standard accept?
Use a publicly accessible audio file lasting 2–60 seconds and at most 5 MiB. The server detects duration and bills by the rounded-up whole second.
Does Kling Avatar 2.0 Standard preserve facial identity?
Yes. Generation is anchored to exactly one portrait, and facial features plus framing remain stable across the talking-avatar take.
Which languages work with Kling Avatar 2.0 Standard voiceovers?
English, Chinese, Japanese, and Korean voice tracks are commonly used for localized demos and outbound messaging with the same portrait.















