MaasUnionMaasUnion
API Reference
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

HeaderRequiredDescription
AuthorizationYesBearer {your_api_token}
Content-TypeRequired for POSTapplication/json

Create Task

POST https://maasunion.com/kling/v1/extended/videos/avatar/image2video

Request Parameters

ParameterTypeRequiredDescription
imagestringYesPerson image URL
sound_filestringYesAudio file URL
promptstringNoMotion description, e.g. "一边说话,一边兴奋的摇头晃脑"
modestringNostd / pro
external_task_idstringNoCustom task ID
callback_urlstringNoCallback 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_statusMeaning
submittedSubmitted
processingProcessing
succeedSucceeded
failedFailed

For more general information, see Kling Gateway Overview.

How is this guide?