> ## 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.

# 電商口播整合指南

> Kling video generation 整合指南 - Ace Data Cloud

透過 `POST /kling/video-commerce` 提交任務，使用已有 `POST /kling/tasks` 查詢平台任務狀態。

## 輸入

上傳一張人物圖並指定 voice\_id，或使用一個預設 avatar\_id（兩者互斥，預設人物不能另行指定 voice\_id）。必須提供一個最多 2000 字的 speech\_script。提供商品資訊時，至少需要一張 ref\_image 和一個 goods\_title；商品口播不支援 speech\_rate。一般人物口播支援 0.8、1.0 或 1.2 倍語速。

以下是請求結構範例，請替換素材 URL 後呼叫。

```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": "你的商品或口播内容"
    },
    {
      "type": "speech_script",
      "text": "你的商品或口播内容"
    }
  ],
  "settings": {
    "resolution": "720p",
    "voice_id": "male_calm_informative"
  },
  "async": true
}
```

## 結果與計費

同步模式回傳生成結果；非同步模式先回傳 `task_id`，完成結果包含 `data` 中的影片或圖片連結及伺服器計算的 `usage`。`callback_url` 用於完成通知；`watermark=true` 請求同時回傳浮水印版本。

一般人物口播：720p 為 1.4 Credits/秒、1080p 為 1.68 Credits/秒；商品口播：720p 為 1.96 Credits/秒、1080p 為 2.24 Credits/秒。影片按實際生成時長結算，生成前的每秒基本價格不代表整項任務總價。失敗任務不收取生成費用。


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