Get API key

by Kuaishou

A portrait that speaks or sings your audio, up to 5 minutes

kling/avatar-2.0/talking-avatarFrom 7.68 creditsper second · $0.077
  • Up to 1080p
  • Talking Avatar
See examples

About Kling Avatar 2.0

The Kling Avatar 2.0 API has one endpoint: send a portrait as image_url and audio as audio_url, and get back a video of the portrait speaking or singing it, as long as the audio up to about five minutes. It is a natural backend for narrated explainers, localised spokesperson videos and podcast clips.

Call it with the model name kling/avatar-2.0/talking-avatar on POST /jobs/createTask, from 7.68 credits per second ($0.077). New accounts get 30 free credits to try it in the Playground first.

Introduction

Kling Avatar 2.0 Talking avatar takes a portrait (image_url) and an audio file of speech or song (audio_url) and returns a video of that person delivering the audio. The clip's length is set by the audio itself - there is no separate duration field - up to roughly 5 minutes. An optional prompt directs mood, gestures and where the eyes go, separately from what the audio says.

Key features

The audio sets the length

There is no duration parameter on this endpoint: trim your audio to the length you want the finished clip to run before you send it. Both speech and singing work as source audio.

The prompt directs the performance, the audio drives the words

prompt is optional and describes how the performance should feel - a mood, a gesture, where the eyes go - while audio_url supplies what is actually said or sung. Keeping the two separate is what let our test clips match delivered dialogue to the source audio word for word while still following a specific direction.

Request parameters

ParameterRequiredDescription
audio_urlYesThe voice or music track to use.
image_urlYesThe picture to start from.
promptNoOptional direction for the performance: mood, gestures, where the eyes go.
resolutionNoOutput size. Bigger sizes look sharper and cost more. 720p · 1080p · Default: 720p

Pricing

Prices are in credits, the same credits you use on the website (1 credit = $0.01). The hold is taken when the task is accepted and settled to the actual charge when it finishes; failed tasks are refunded.

OptionCredits per second≈ USD
resolution 720p7.68$0.077
resolution 1080p15.36$0.15

For an exact number before you run, send the same body to POST /jobs/quote.

Use cases

Give a script a face

Pair a recorded or generated line with a portrait to produce a spoken clip - useful for narrated intros, testimonials, or dialogue for a character whose face you've already settled on.

Direct a sung performance from a still photo

Send a sung audio track alongside a portrait and a short prompt describing the performance (audience, energy, a hand gesture) rather than the words themselves.

Prompt guide & pro tips

Write an arc, not a single mood

A direction like "glancing down once, then back into the lens with a shy laugh at the end" gives the avatar a small sequence to perform, rather than holding one static expression across the whole clip.

Choose a clear, front-facing portrait

A well-lit, front-facing photo gives the most reliable lip sync and expression. Side angles, obscured faces or extreme close-crops are more likely to drift as the clip runs.

Expect the clip to run a touch longer than the audio

In our tests the finished video consistently ran a little longer than the source audio - an 11.4-second line came back as a 12.27-second clip - so build in a small pad rather than expecting frame-exact timing at the very end.

Trim silence off both ends of the audio

A file that opens or closes on a long pause gives the avatar dead time with nothing to perform. Trim the audio close to where the speech or singing actually starts and ends before you send it.

API quick start

Call the Kling Avatar 2.0 API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow- and use the same credits as the website.
  2. Send the request. POST /jobs/createTask with model kling/avatar-2.0/talking-avatar and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "kling/avatar-2.0/talking-avatar",
  "input": {
    "prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "audio_url": "https://media.popnow.ai/shortfilm/voices/Aoede-46e4c427.mp3",
    "resolution": "720p"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

What to build with the Kling Avatar 2.0 API

  • Localisation tools: one spokesperson portrait, a separate audio file per language.
  • Narrated explainers where a text-to-speech step feeds audio_url.
  • Music apps that turn a cover photo and a song into a performance clip.

Kling Avatar 2.0 parameter notes

  • image_url and audio_url are both required; output length follows the audio.
  • resolution is 720p or 1080p; 1080p costs twice as much per second.
  • A short prompt sets mood and gestures; it does not change the face.
  • Trim audio server-side before sending to control cost and length.

How Kling Avatar 2.0 API pricing adds up

Billed per second of the audio you send. A five minute narration is a sizeable charge, so quote long files first and cap upload length in your UI.

  • resolution 720p, 5-second clip: 39 credits ($0.39) each, 3900 credits ($39.00) for 100 clips
  • resolution 1080p, 5-second clip: 77 credits ($0.77) each, 7700 credits ($77.00) for 100 clips

Async jobs, webhooks and rate limits

Every Kling Avatar 2.0 request is asynchronous: createTask returns a taskId straight away, and the result arrives when the job finishes. Poll GET /jobs/recordInfo every few seconds, or pass a public https callBackUrl and verify the X-Webhook-Signature header (HMAC-SHA256 over taskId, timestamp and the body hash) before trusting the payload. Each account gets 1,000 write requests per 10 seconds; a 429 carries Retry-After. Send an Idempotency-Key with createTask so a retried request for kling/avatar-2.0/talking-avatar never runs or bills twice.

Common Kling Avatar 2.0 API errors

errorCodeWhat it usually means and how to fix it
invalid_assetAn audio file that cannot be decoded or a portrait with no clear face.
invalid_requestMissing image_url or audio_url.
content_rejectedThe portrait or audio was refused; the hold is released.

Kling Avatar 2.0 API questions

How much does the Kling Avatar 2.0 API cost?

Kling Avatar 2.0 costs 7.68 credits ($0.077) per second. Prices by option: 720p 7.68 credits per second, 1080p 15.36 credits per second. Credits are the same as on the website (1 credit = $0.01), new accounts get 30 free credits, and failed tasks are refunded.

What is the model name for Kling Avatar 2.0 in the API?

Put kling/avatar-2.0/talking-avatar for Talking Avatar in the model field of POST /jobs/createTask.

How long can Kling Avatar 2.0 API output be?

As long as the audio, up to about five minutes.

Can I generate the voice with the same API?

Not on this endpoint. Generate speech with a text-to-speech model first, then pass the file as audio_url.

Does Kling Avatar 2.0 support 1080p?

Yes, at twice the 720p per-second rate.

What are the limits of the Kling Avatar 2.0 API?

Resolutions: 720p · 1080p; Prompt length (characters): 2,500; Largest upload: 10 MB. Requests outside these limits are rejected before anything is charged.

Can I try Kling Avatar 2.0 without writing code?

Yes. The Playground runs Kling Avatar 2.0 on your PopNow credits, needs no API key, and shows the matching code for every run.

All Kling models

Kling 2.6 makes a full scene with camera movement and sound; Avatar 2.0 is for a fixed portrait that talks or sings.

More about Kling Avatar 2.0