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

# 物体互动

> 注册产品图片，让角色能够在对话中展示产品。

为角色提供一张需要展示的产品参考图。创建会话时注册该图片，使角色从第一次对话起就能使用它。

## 1. 体验蓝牙音箱示例

打开 [Avatar Playground](https://docs.vivix.ai/cn/streaming-avatar/get-started/avatar-playground.md)，选择 **Object interaction**。该示例包含购物主持人 Olivia，以及一张已注册的蓝牙音箱图片。

场景开始时桌面为空。启动实时会话后询问：“Could you introduce the Bluetooth speaker?”，然后说：“Put it away, please.” 她收起音箱后，检查音箱是否始终不在画面中，并确认她的双手为空。

## 2. 创建会话时注册产品

在[创建会话](https://docs.vivix.ai/cn/streaming-avatar/api-references/sessions/create.md)请求的 `assets.images` 中添加参考素材。以下片段使用 Playground 中的音箱；请将 URL 和描述替换为你自己的产品信息。

```json wrap theme={null}
{
  "assets": {
    "images": [
      {
        "asset_id": "OBJ_0",
        "url": "https://static.vivi-x.ai/images/2026/08/03/78381c69f70a3771.png",
        "mime_type": "image/png",
        "description": "An upright dark gray cylindrical Bluetooth speaker<OBJ_0> with a perforated grille, a flat top, and a flat circular base."
      }
    ]
  }
}
```

请使用 Vivix 无需自定义请求头即可获取的公开 HTTPS URL。参考图应清楚展示产品。选择一张双手可见、周围有足够展示空间的[起始图片](https://docs.vivix.ai/cn/streaming-avatar/character/first-image.md)。

## 3. 为每张参考图命名并添加描述

图片素材 ID 使用 **`OBJ_0`、`OBJ_1`……**，每个物体使用不同的编号。在整个会话中，同一个 ID 应始终对应同一件产品。

`description` 为可选字段。如果填写，请使用匹配的标签：素材名称为 `OBJ_0` 时，描述中应包含 **`<OBJ_0>`**。素材 ID 本身不含尖括号，描述中的标签则需要尖括号。

描述物体的可见外观，例如形状、颜色、材质和明显特征。描述应客观，并与图片保持一致。例如，`a dark gray cylindrical Bluetooth speaker<OBJ_0> with a perforated grille` 已足以识别该产品。不要在图片描述中加入要求执行的动作或销售宣传。

如果有多个产品，请为每个产品使用不同的名称和描述，使角色能够区分它们。

## 4. 在实时会话中添加产品

如果某个产品在会话开始后才可用，请通过 [`asset.add`](https://docs.vivix.ai/cn/streaming-avatar/api-references/client-events/asset-add) 注册。在要求角色使用产品之前，等待 [`asset.added`](https://docs.vivix.ai/cn/streaming-avatar/api-references/server-events/asset-added)。命名和描述规则与上文相同。


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