Skip to main content
POST
/
kling-avatar
/
async
curl --request POST \
  --url https://api.modellix.ai/api/v1/image-to-video/kling/kling-avatar/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image": "https://example.com/avatar.jpg",
  "audio_id": "audio-abc123"
}
'
{
  "code": 0,
  "message": "success",
  "data": {
    "status": "pending",
    "task_id": "task-avatar001",
    "model_id": "kling-avatar"
  }
}

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json
image
string
required

Reference image for digital human avatar. Supports URL or Base64 encoded string. Supported formats: JPG/JPEG/PNG. Maximum file size: 10MB. Minimum resolution: 300x300px. Aspect ratio should be between 1:2.5 and 2.5:1. Do not include Base64 prefix (e.g., 'data:image/png;base64,').

Minimum string length: 1
Example:

"https://example.com/avatar.jpg"

audio_id
string
required

Audio ID generated by TTS API. Mutually exclusive with sound_file - exactly one must be provided. Only supports audio generated within the last 30 days. Audio duration must be between 2-300 seconds.

Minimum string length: 1
Example:

"audio-abc123"

sound_file
string

Audio file URL or Base64 encoded string. Mutually exclusive with audio_id - exactly one must be provided. Supported formats: mp3/wav/m4a/aac. Maximum file size: 5MB. Audio duration must be between 2-300 seconds.

Minimum string length: 1
Example:

"https://example.com/audio.mp3"

prompt
string

Prompt for defining avatar's actions, emotions, and camera movements (1-2500 characters). Optional.

Required string length: 1 - 2500
Example:

"Speaking with a smile, camera slowly zooms in"

mode
enum<string>
default:std

Generation mode: std (standard, cost-effective) or pro (professional, higher quality but longer processing)

Available options:
std,
pro
Example:

"std"

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required