APIMODELSAPIMODELS
APIドキュメント

apimodels.app

Kling AI Avatar API reference

Kling AI Avatar is Kuaishou Kling's talking-avatar model: one portrait plus one driving audio clip (and an optional prompt) becomes a video of that person saying the audio, with lip movement and expressions that follow the sound. On APIMODELS it is one model id, kling-avatar, on the unified video endpoint. The video is as long as the audio (2-300 seconds); mode std renders 720p and mode pro renders 1080p. Billed per second of driving audio, rounded up to the whole second: $0.062 standard, $0.123 pro.

Pricing

Driving audioStandard std (720p)Pro pro (1080p)
Per second (rounded up to the whole second)$0.062$0.123
2 s (minimum)$0.124$0.246
3.53 s (billed as 4 s)$0.248$0.492
10 s$0.62$1.23
60 s$3.72$7.38
300 s (maximum)$18.60$36.90

Billed seconds = the driving audio's length rounded up, measured by us when the task is created (any length you send yourself is ignored). The image and the prompt do not change the price; only mode does. Audio whose length cannot be read, or that falls outside 2-300 seconds, returns a 400 before anything is charged; failed generations are not charged.

Authentication

All requests carry the API key in the header:

Authorization: Bearer YOUR_API_KEY

Create a task and poll it

POSThttps://api.apimodels.app/v1/video/generations·GET/v1/video/generations?task_id=
# Kling AI Avatar — one portrait + one driving audio -> talking-avatar video.
# image_url and audio_url are required; prompt and mode (std | pro) are optional.
# The video is as long as the audio; billed per audio second, rounded up:
# std (720p) $0.062/s, pro (1080p) $0.123/s.
curl -X POST https://api.apimodels.app/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-avatar",
    "image_url": "https://example.com/presenter.jpg",
    "audio_url": "https://example.com/voice.mp3",
    "prompt": "She nods while talking and smiles at the end; slow push-in",
    "mode": "std"
  }'

# Response (async — a task is created):
# { "code": 200, "msg": "success", "data": { "taskId": "clxxx", "state": "pending", "model": "kling-avatar" } }

# Poll every 10-15 s until completed (result files are kept 30 days)
curl "https://api.apimodels.app/v1/video/generations?task_id=TASK_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
# { "code": 200, "data": { "state": "completed",
#     "resultUrls": ["https://r2.apimodels.app/videos/clxxx.mp4"] } }

A task moves through pending → processing → completed or failed. On completed, data.resultUrls[0] is the MP4; on failed, the reason is in data.failMsg and the charge is returned. In our test on 21 November 2026, a 3.53-second clip in standard mode finished in 146 seconds; that is one measurement, not a promise. Polling every 10-15 seconds is plenty.

Callback (callback_url)

To skip polling, pass callback_url in the create request. When the task reaches completed or failed we send an HTTP POST (JSON) to it. Failed deliveries are retried with backoff for up to 30 minutes, until your endpoint returns a 2xx. The URL must be publicly reachable; localhost and private addresses return a 400 at create time. Polling keeps working either way.

POST {your callback_url}
Content-Type: application/json

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "clxxx...",
    "model": "kling-avatar",
    "state": "completed",                 // or "failed"
    "param": "<JSON string>",             // your request, JSON.parse once
    "resultJson": "<JSON string> | null", // {"resultUrls": ["https://...mp4"]}, JSON.parse once
    "failCode": null,
    "failMsg": null
  }
}

Parameters

FieldRequiredTypeDescription
modelYesstringkling-avatar (kling-ai-avatar also works)
image_urlYesstringThe portrait, a public URL or base64 data URI; exactly one. image, or image_urls with a single item, are accepted too.
audio_urlYesstringThe driving audio (speech or singing), a public URL or base64 data URI. MP3, WAV, M4A or AAC, 2-300 seconds, up to 5 MB. Its length sets the video length and the price.
modeNostringstd (default, 720p, $0.062/s) or pro (1080p, $0.123/s). resolution 720p / 1080p is accepted too.
promptNostringDescribes actions, emotion and camera movement; up to 2,500 characters.
callback_urlNostringWe POST the result to this URL on completion; omit it and poll the GET endpoint instead.

There is no duration parameter: the length comes from the audio. Trim the audio to the length you want.

Input limits

  • Image — JPG or PNG; up to 10 MB; shorter side at least 300 px; aspect ratio between 1:2.5 and 2.5:1. Exactly one.
  • Audio — MP3, WAV, M4A or AAC; 2-300 seconds; up to 5 MB. The length is measured when the task is created.
  • Prompt — Optional, up to 2,500 characters.
  • Output — MP4, about as long as the audio. One measured example: standard mode, a 1280×720 portrait + 3.53 s of speech → a 3.47-second video in 146 seconds.

Errors

Parameter problems come back synchronously as a 400 at creation ({"code": 400, "msg": "..."}): no task is created and nothing is charged. The msg strings below are the current wording (N is the actual number).

msgCause / fix
image_url is required: one portrait image (jpg / png, at least 300 px, aspect ratio between 1:2.5 and 2.5:1, up to 10 MB)No portrait was sent. Pass one JPG or PNG as image_url (or image, or image_urls with a single item).
audio_url is required: the driving audio (mp3 / wav / m4a / aac, 2–300 seconds, up to 5 MB)No driving audio was sent.
mode must be "std" (720p) or "pro" (1080p)mode only takes std or pro (resolution 720p or 1080p works too).
Unable to read the audio duration — provide a publicly reachable mp3, wav, m4a or aac URLWe could not read the audio length: the link needs a login, has expired, or is not a readable audio file. Use a link anyone can download directly.
driving audio is Ns — Kling Avatar needs at least 2 secondsThe audio is shorter than 2 seconds.
driving audio is Ns — Kling Avatar accepts up to 300 seconds (5 minutes)The audio is longer than 300 seconds. Trim it, or split it into several requests.
prompt is N characters; Kling Avatar accepts up to 2500The prompt is longer than 2,500 characters.
  • 401: the API key is missing or invalid.
  • 402: the balance does not cover this audio (seconds × the per-second price).
  • Failures during generation (content safety rejection, upstream error, timeout) end in state failed with the reason in data.failMsg, and the charge is returned automatically.

Notes

  • Each request takes one portrait and one audio clip; for turn-taking dialogue, generate one clip per turn and edit them together.
  • Result files are deleted after 30 days, so download or re-host them promptly.
  • Only upload faces and voices you have the rights to use.

Try it in the Playground. Use cases and worked price examples are on the Kling AI Avatar model page.

Related

FAQ

How much does the Kling AI Avatar API cost?

$0.062 per second of driving audio in standard mode (720p) and $0.123 in pro mode (1080p), rounded up to the whole second and measured when the task is created. Failed generations are not charged.

Which fields does a Kling AI Avatar request need?

model (kling-avatar), image_url with one JPG or PNG portrait and audio_url with the driving audio. mode (std or pro), prompt and callback_url are optional.

What audio does Kling AI Avatar accept?

MP3, WAV, M4A or AAC, 2 to 300 seconds, up to 5 MB, as a public URL or a base64 data URI. Audio whose length cannot be read, or outside 2-300 seconds, returns a 400 before anything is charged.