AI Model APIVideoKling Video
Kling Digital Human
Channel type: Kling Extended (66) Gateway path:
POST https://maasunion.com/kling/v1/extended/videos/avatar/image2video·GET .../avatar/image2video/{task_id}Official upstream:https://api-beijing.klingai.com(/v1/videos/avatar/image2video)
Overview
The digital human capability is based on a person image and an audio file, generating a video of the person speaking/acting. You can describe the motion via prompt.
Authentication
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer {your_api_token} |
Content-Type | Required for POST | application/json |
Create Task
POST https://maasunion.com/kling/v1/extended/videos/avatar/image2video
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Person image URL |
sound_file | string | Yes | Audio file URL |
prompt | string | No | Motion description, e.g. "一边说话,一边兴奋的摇头晃脑" |
mode | string | No | std / pro |
external_task_id | string | No | Custom task ID |
callback_url | string | No | Callback URL |
Request Example
curl --request POST \
--url "https://maasunion.com/kling/v1/extended/videos/avatar/image2video" \
--header "Authorization: Bearer {your_api_token}" \
--header "Content-Type: application/json" \
--data '{
"image": "https://example.com/person.jpg",
"sound_file": "https://example.com/voice.mp3",
"prompt": "一边说话,一边兴奋的摇头晃脑",
"mode": "std"
}'Create Response
{
"code": 0,
"message": "string",
"request_id": "string",
"data": {
"task_id": "gateway_public_task_id",
"task_status": "submitted",
"created_at": 1722769557708,
"updated_at": 1722769557708
}
}Query Task
GET https://maasunion.com/kling/v1/extended/videos/avatar/image2video/{task_id}
curl --request GET \
--url "https://maasunion.com/kling/v1/extended/videos/avatar/image2video/{task_id}" \
--header "Authorization: Bearer {your_api_token}"The query response returns the generated video in task_result.videos, with the same structure as the standard video.
Task Status
task_status | Meaning |
|---|---|
submitted | Submitted |
processing | Processing |
succeed | Succeeded |
failed | Failed |
For more general information, see Kling Gateway Overview.
How is this guide?