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

# 商品带货视频 API

## 接入前准备

先登录 LuluLab，在「我的 Key」获取 luk- 开头的 API Key，并在自己的服务端保存。所有示例都向 [https://customer.lululab.ai](https://customer.lululab.ai) 发起请求；Authorization 请求头直接填写原始 Key。 [获取 API Key](https://www.lululab.ai/keys)

生成任务是异步的：POST /tasks 返回任务 id，随后调用 GET /tasks/\{id} 获取状态与 output。可以先通过 POST /billing/estimates 预估积分。

分两步完成：先用 SalesVideoPromptV3 生成完整视频方案，待方案任务成功后，从返回的 output 读取 videoPrompt.prompt；多条方案读取 videos\[].videoPrompt.prompt。部分结果会多包一层 output。再为每条方案提交 VideoCreationV1。方案任务本身不会返回成片。

准备商品照片、商品名称、真实卖点和目标市场。策划步骤负责把这些资料转换成视频 prompt；生成步骤才会产出可下载的视频。不要把未核实的产品功效写进 productInfo。

### 第 1 步请求字段与枚举

| 字段 / 类型 | 必填 | 可选值与说明 |
| - | - | - |
| `input.model` (`string`) | 是 | seedance-2-mini · seedance-2-fast · seedance-2-5-flash · seedance-2 · seedance-2-5 · minimax-h3 · google-veo · grok-imagine-1-5-preview · wan-3 · 策划和成片使用同一视频模型 ID。 |
| `input.duration` (`integer`) | 是 | 每条视频秒数；所选模型必须支持。 |
| `input.videoCount` (`integer`) | 否 | 1–20 · 需要的独立方案数；省略时为 1。 |
| `input.aspectRatio` (`string`) | 是 | 成片画幅；使用模型表中的值。 |
| `input.resolution` (`string`) | 是 | 成片分辨率；使用模型表中的值。 |
| `input.generateAudio` (`boolean`) | 否 | true · false · 是否生成声音，省略时为 true。 |
| `input.referenceImages` (`array<MediaReference>`) | 是 | 至少一张商品图；上传后使用 location 作为 url。 |
| `input.creativeType` (`string`) | 否 | auto · productPitch · storyDrivenAd · lifestyleSeeding · 创意形式；auto 表示智能匹配。 |
| `input.salesRegion` (`string`) | 是 | 目标销售国家或地区，例如 United States。 |
| `input.speechLanguage` (`string`) | 是 | 视频口播语言，例如 English。 |
| `input.promptLanguage` (`string`) | 否 | zh-CN · en-US · 方案提示词语言；网站当前提供这两种交互语言。 |
| `input.interactionLanguage` (`string`) | 否 | zh-CN · en-US · 方案解释文本语言。 |
| `input.productInfo.name` (`string`) | 是 | 商品名称。 |
| `input.productInfo.category` (`string`) | 否 | 商品类目。 |
| `input.productInfo.features` (`string`) | 否 | 真实、可核实的产品特性。 |
| `input.productInfo.sellingPoints` (`string`) | 是 | 真实卖点，不填写未经核实的功效或价格。 |
| `input.productInfo.targetAudience` (`string`) | 否 | 目标受众。 |
| `input.productInfo.usageScenarios` (`string`) | 否 | 使用场景。 |
| `input.creativeBrief` (`string`) | 否 | 额外创作要求，不能与商品事实冲突。 |

### 第 1 步：策划视频

```bash 商品视频策划请求 theme={null}
curl -X POST https://customer.lululab.ai/tasks \
  -H "Authorization: $LULULAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "SalesVideoPromptV3",
    "input": {
      "model": "seedance-2-mini",
      "duration": 5,
      "videoCount": 1,
      "aspectRatio": "9:16",
      "resolution": "480p",
      "generateAudio": true,
      "referenceImages": [{ "url": "PRODUCT_IMAGE_URL", "mimeType": "image/jpeg" }],
      "creativeType": "auto",
      "salesRegion": "United States",
      "speechLanguage": "English",
      "promptLanguage": "en-US",
      "interactionLanguage": "en-US",
      "productInfo": {
        "name": "Ceramic cup",
        "category": "Home goods",
        "features": "Ceramic material",
        "sellingPoints": "Handmade finish",
        "targetAudience": "Coffee lovers",
        "usageScenarios": "Morning coffee"
      },
      "creativeBrief": "Use only the product facts supplied above."
    }
  }'
```

策划成功后，单条方案读取 output.videoPrompt.prompt；多条方案读取 output.videos\[].videoPrompt.prompt。若 output 外还有一层 output 对象，先进入内层。

```json 策划结果示例（仅展示关键字段） theme={null}
{
  "status": "Succeeded",
  "output": {
    "videoPrompt": {
      "summary": "A short product showcase",
      "duration": 5,
      "prompt": "FULL_VIDEO_PROMPT_FOR_VIDEO_CREATION"
    }
  }
}
```

### 第 2 步请求字段

成片任务的 workflowId 为 VideoCreationV1，input 与视频生成字段相同；prompt 必须使用上一步返回的完整提示词。模型、比例、时长和参考图保持一致。

| 字段 / 类型 | 必填 | 可选值与说明 |
| - | - | - |
| `input.taskType` (`string`) | 否 | reference · 首批开放的生成方式；省略时工作流默认 reference。 |
| `input.model` (`string`) | 是 | seedance-2-mini · seedance-2-fast · seedance-2-5-flash · seedance-2 · seedance-2-5 · minimax-h3 · google-veo · grok-imagine-1-5-preview · wan-3 · 视频模型 ID；模型表列出各自支持的时长、分辨率和比例。 |
| `input.prompt` (`string`) | 是 | 描述视频内容、动作、镜头和声音要求；不能为空。 |
| `input.duration` (`number`) | 是 | 视频秒数；需在所选模型支持的区间内。 |
| `input.aspectRatio` (`string`) | 是 | 目标画幅；具体枚举按模型见下表。 |
| `input.resolution` (`string`) | 是 | 目标分辨率；具体枚举按模型见下表。 |
| `input.generateAudio` (`boolean`) | 否 | true · false · 是否生成声音；省略时默认为 true，实际能力仍由模型决定。 |
| `input.referenceImages` (`array<MediaReference>`) | 否 | 参考图片数组；每项含 url、mimeType。 |
| `input.referenceVideos` (`array<MediaReference>`) | 否 | 参考视频数组；仅支持相关模型，数量受模型限制。 |
| `input.referenceAudios` (`array<MediaReference>`) | 否 | 参考音频数组；数量受模型限制。 |

### 第 2 步：生成成片

将 PASTE\_VIDEO\_PROMPT\_FROM\_PLAN 换成上一步返回的完整 prompt；保持模型、时长和参考图一致。

```bash 商品视频生成请求 theme={null}
curl -X POST https://customer.lululab.ai/tasks \
  -H "Authorization: $LULULAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "VideoCreationV1",
    "input": {
      "taskType": "reference",
      "model": "seedance-2-mini",
      "prompt": "PASTE_VIDEO_PROMPT_FROM_PLAN",
      "aspectRatio": "9:16",
      "resolution": "480p",
      "duration": 5,
      "generateAudio": true,
      "referenceImages": [{ "url": "PRODUCT_IMAGE_URL", "mimeType": "image/jpeg" }]
    },
    "attributes": { "saveGeneratedAssets": true, "creationSource": "api" }
  }'
```

> [!NOTE]
>
> 如果策划返回多条 videos，逐条读取 prompt 并分别提交 VideoCreationV1；每条成片任务有独立的 id，需要分别查询。

* [上传参考素材](https://docs.lululab.ai/cn/uploads.md)
* [查询任务与错误](https://docs.lululab.ai/cn/task-results.md)
* [接口参考](https://docs.lululab.ai/cn/reference.md)


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