Theme
Digital Avatar
POST
https://www.kkiai.com/kling/v1/videos/avatar/image2video
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter Name | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Optional | application/json | |
Authorization | string | Optional | Bearer {{YOUR_API_KEY}} |
Body Parameters (application/json)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
image | string | Required | Digital avatar reference image. Supports Base64-encoded image or image URL (must be accessible). Supported formats: .jpg / .jpeg / .png. Image file size must not exceed 10MB. Image dimensions must be at least 300px. Image aspect ratio must be between 1:2.5 ~ 2.5:1 |
audio_id | string | Required | Audio ID generated through the preview interface. Only supports audio generated within 30 days with duration between 2 seconds and 300 seconds. Either audio_id or sound_file parameter must be provided, but not both empty and not both with values |
sound_file | string | Required | Audio file. Supports Base64-encoded audio or audio URL (must be accessible). Supported formats: .mp3/.wav/.m4a/.aac. File size must not exceed 5MB. Format mismatch or oversized files will return error codes. Only supports audio with duration between 2 seconds and 300 seconds. Either audio_id or sound_file parameter must be provided, but not both empty and not both with values. The system will validate audio content and return error codes if there are issues |
prompt | string | Required | |
mode | string | Required | |
callback_url | string | Required | |
external_task_id | string | Required |
Request Example
json
{
"image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"audio_id": "825455158141661278",
"sound_file": "",
"prompt": "",
"mode": "std",
"callback_url": "",
"external_task_id": ""
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/kling/v1/videos/avatar/image2video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"audio_id": "825455158141661278",
"sound_file": "",
"prompt": "",
"mode": "std",
"callback_url": "",
"external_task_id": ""
}'Response
🟢 200 Success
Response Example
json
{}