E-commerce Talking Avatar Integration Guide
Submit tasks via POST /kling/video-commerce, and use the existing POST /kling/tasks to query platform task status.
¶ Input
Upload a character image and specify voice_id, or use a preset avatar_id (the two are mutually exclusive; preset characters cannot additionally specify voice_id). A speech_script of up to 2,000 characters must be provided. When providing product information, at least one ref_image and one goods_title are required; product talking avatars do not support speech_rate. Regular character talking avatars support speech rates of 0.8x, 1.0x, or 1.2x.
The following is an example request structure. Replace the asset URLs before calling.
{
"contents": [
{
"type": "avatar_image",
"url": "https://your-cdn.example/person.jpg"
},
{
"type": "ref_image",
"url": "https://your-cdn.example/product.jpg"
},
{
"type": "goods_title",
"text": "Your product or talking avatar content"
},
{
"type": "speech_script",
"text": "Your product or talking avatar content"
}
],
"settings": {
"resolution": "720p",
"voice_id": "male_calm_informative"
},
"async": true
}
¶ Results and Billing
Synchronous mode returns the generated result; asynchronous mode first returns a task_id, and the completed result includes video or image links in data and server-calculated usage. callback_url is used for completion notifications; requests with watermark=true also return a watermarked version.
Regular character talking avatars: 1.4 Credits/second for 720p and 1.68 Credits/second for 1080p; product talking avatars: 1.96 Credits/second for 720p and 2.24 Credits/second for 1080p. Videos are billed based on the actual generated duration. The base price per second before generation does not represent the total price of the entire task. Failed tasks are not charged generation fees.
