Avatar
Генеруйте відео з аватарами на основі зображень за допомогою Kling Avatar API у CometAPI. Використовуйте POST /kling/v1/videos/avatar/image2video для швидкого перетворення зображення у відео з аватаром.
Використовуйте цей endpoint, щоб створювати кліпи з аватаром, що говорить, з одного вихідного зображення та одного джерела аудіо.Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
Перш ніж викликати його
- Надайте одне
imageаватара як публічний URL або рядок raw base64 - Надішліть рівно одне з
audio_idабоsound_file - Перший запит має бути простим: одне зображення обличчя, один аудіокліп і короткий необов’язковий prompt
- Починайте з
mode: std, якщо вам не потрібен саме варіант вищої якості
Правила для джерела аудіо
audio_id— найпростіший варіант, якщо ви вже згенерували мовлення через маршрут Kling TTSsound_fileпідходить, якщо у вас уже є власний MP3, WAV, M4A або AAC файл- Для аудіо аватара в документації вказано тривалість від 2 до 60 секунд
Потік виконання завдання
Створіть завдання аватара
Опитуйте стан завдання
Авторизації
Bearer token authentication. Use your CometAPI key.
Заголовки
Optional content type header.
Тіло
- Option 1
- Option 2
Avatar reference image. Accepts an image URL or raw Base64 string (no data: prefix). Supported formats: JPG, JPEG, PNG. Max file size 10 MB. Minimum dimension 300 px on each side; aspect ratio between 1:2.5 and 2.5:1.
Audio ID returned by the Kling TTS API. Only audio clips between 2 and 60 seconds generated within the last 30 days are accepted. Mutually exclusive with sound_file — exactly one must be provided.
Text prompt to guide avatar actions, emotions, and camera movements. Max 2500 characters. Required — the API rejects requests without this field.
Audio file as a URL or Base64 string. Accepted formats: MP3, WAV, M4A, AAC. Max 5 MB, duration 2–60 seconds. Mutually exclusive with audio_id — exactly one must be provided.
Generation mode. std (standard, faster and more cost-effective) or pro (professional, higher quality output).
Webhook URL for task status notifications. The server sends a callback when the task status changes.
Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.