Avatar
Genereer avatar-gestuurde video’s uit afbeeldingen met de Kling Avatar API in CometAPI. Gebruik POST /kling/v1/videos/avatar/image2video voor snelle image-to-video avatars.
Gebruik deze endpoint om pratende avatarclips te maken van één bronafbeelding plus één audiobron.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.
Voordat je deze aanroept
- Geef één avatar-
imageop als publieke URL of onbewerkte base64-string - Verstuur exact één van
audio_idofsound_file - Houd het eerste verzoek eenvoudig: één gezichtsafbeelding, één audioclip en een korte optionele prompt
- Begin met
mode: std, tenzij je specifiek het pad met hogere kwaliteit nodig hebt
Regels voor audiobronnen
audio_idis de eenvoudigste optie als je al spraak hebt gegenereerd via de Kling TTS-routesound_filewerkt als je al je eigen MP3-, WAV-, M4A- of AAC-bestand hebt- Avatar-audio is gedocumenteerd als 2 tot 60 seconden lang
Taakverloop
Maak de avatar-taak aan
Poll de taak
Autorisaties
Bearer token authentication. Use your CometAPI key.
Headers
Optional content type header.
Body
- 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.