audio_id to avatar generation. If you already have an audio file, pass it with sound_file and skip TTS.
- Avatar
- TTS
Create task
POST /kling/v1/videos/avatar/image2videocURL
Request headers
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
default:"application/json"
required
Data exchange format.
Request body
string
required
Public image URL or raw Base64. Supports JPG, JPEG, and PNG up to 10 MB. Each side must be at least 300 px and the aspect ratio must be between 1:2.5 and 2.5:1. Do not add a data-URI prefix to Base64.
string
Audio ID produced within the last 30 days. The audio must be 2–300 seconds. Provide exactly one of
audio_id and sound_file.string
Public audio URL or raw Base64. Supports MP3, WAV, M4A, and AAC up to 5 MB and 2–300 seconds. Provide exactly one of
sound_file and audio_id.string
Optional motion, emotion, and camera direction. Maximum length: 2,500 characters.
string
default:"std"
Generation mode:
std or pro.object
Watermark configuration.
boolean
Whether to generate a watermarked result.
string
Public callback URL for task-status notifications.
Create response
200
string
AnyFast task ID.
string
AnyFast task ID, identical to
id.string
Returned object type. For this endpoint,
video.string
Underlying request model identifier returned by the endpoint.
string
Initial AnyFast status. An accepted task returns
queued.integer
Initial progress percentage.
integer
Creation time as a Unix timestamp in seconds.
Query task
GET /kling/v1/videos/avatar/image2video/{task_id}cURL
Request headers and path
string
required
Bearer authentication in the form
Bearer YOUR_API_KEY.string
required
AnyFast task ID returned by avatar creation.
Response
200
integer
Business result code.
0 indicates success.string
Business message. It can be empty on success.
string
AnyFast task ID.
string
Task status:
submitted, processing, succeed, or failed. Intermediate states can repeat or move between submitted and processing; treat only succeed and failed as terminal.string
Failure details when the task fails.
object[]
Generated video results. Present when the task succeeds.
string
Generated video URL.
string
Reported video duration in seconds.
integer
Creation time as a Unix timestamp in milliseconds.
integer
Update time as a Unix timestamp in milliseconds.