> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# E-commerce Talking Video Integration Guide

> Kling video generation API guide - Ace Data Cloud

Submit tasks via `POST /kling/video-commerce`, and use the existing `POST /kling/tasks` to query platform task status.

## Input

Upload one character image and specify a voice\_id, or use a preset avatar\_id (the two are mutually exclusive; preset characters cannot additionally specify a voice\_id). You must provide a speech\_script of up to 2,000 characters. When providing product information, at least one ref\_image and one goods\_title are required; product talking videos do not support speech\_rate. Regular character talking videos support speech rates of 0.8x, 1.0x, or 1.2x.

Below is an example of the request structure. Replace the asset URLs before calling.

```json theme={null}
{
  "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 content"
    },
    {
      "type": "speech_script",
      "text": "Your product or talking 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` return a watermarked version as well.

Regular character talking videos: 1.4 Credits/second for 720p and 1.68 Credits/second for 1080p; product talking videos: 1.96 Credits/second for 720p and 2.24 Credits/second for 1080p. Videos are billed based on the actual generated duration, and the per-second base price before generation does not represent the total price of the entire task. Failed tasks are not charged generation fees.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.