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

# asset.add

Registers additional reusable script assets while the session is live. Assets are additive: existing `asset_id` values cannot be changed or replaced in v1. If any asset in the event is invalid, none of the assets in that event are registered. Wait for `asset.added` before referencing the new ids from `response.script`.

## Event fields

<ParamField body="event_id" type="string">
  Client-generated id for this event.
</ParamField>

<ParamField body="type" type="string" required>
  Event type. Must be `asset.add`.
</ParamField>

<ParamField body="assets" type="object" required>
  Assets to register for later scripted responses. Provide at least one asset across `images`, `audio`, `speech_text`, or `visual_prompts`.
</ParamField>

<ParamField body="assets.images" type="array">
  Reusable images that can be registered to the underlying media session.
</ParamField>

<ParamField body="assets.images[].asset_id" type="string" required>
  Caller-defined image asset id, unique within the session.
</ParamField>

<ParamField body="assets.images[].url" type="string" required>
  HTTPS URL for the image file.
</ParamField>

<ParamField body="assets.images[].mime_type" type="string">
  Image MIME type, such as `image/png` or `image/jpeg`.
</ParamField>

<ParamField body="assets.audio" type="array">
  Reusable audio files for `response.script.vocal.type: "audio_asset"`.
</ParamField>

<ParamField body="assets.audio[].asset_id" type="string" required>
  Caller-defined audio asset id, unique within the session.
</ParamField>

<ParamField body="assets.audio[].url" type="string" required>
  HTTPS URL for the audio file. The URL must be directly fetchable by Vivix without custom request headers.
</ParamField>

<ParamField body="assets.audio[].mime_type" type="string">
  Audio MIME type. Supported values are `audio/wav` and `audio/mpeg`.
</ParamField>

<ParamField body="assets.speech_text" type="array">
  Reusable exact speech text for `response.script.vocal.type: "speech_asset"`.
</ParamField>

<ParamField body="assets.speech_text[].asset_id" type="string" required>
  Caller-defined speech text asset id, unique within the session.
</ParamField>

<ParamField body="assets.speech_text[].text" type="string" required>
  Exact text to synthesize. When used in `response.script`, it also streams through output text events.
</ParamField>

<ParamField body="assets.speech_text[].format" type="string">
  Text format, such as `text` or `ssml`.
</ParamField>

<ParamField body="assets.visual_prompts" type="array">
  Reusable visual instructions for `response.script.visual.visual_prompt_asset_id`.
</ParamField>

<ParamField body="assets.visual_prompts[].asset_id" type="string" required>
  Caller-defined visual prompt asset id, unique within the session.
</ParamField>

<ParamField body="assets.visual_prompts[].text" type="string" required>
  Reusable visual instruction text describing avatar movement, posture, gaze, gestures, or presentation.
</ParamField>

<ParamField body="assets.visual_prompts[].format" type="string">
  Text format, such as `text`.
</ParamField>

<RequestExample>
  ```json asset.add theme={null}
  {
    "event_id": "evt_asset_add_001",
    "type": "asset.add",
    "assets": {
      "audio": [
        {
          "asset_id": "promo_sting",
          "url": "https://cdn.example.com/audio/promo-sting.wav",
          "mime_type": "audio/wav"
        }
      ],
      "speech_text": [
        {
          "asset_id": "line_discount",
          "text": "This deal is available for the next ten minutes."
        }
      ],
      "visual_prompts": [
        {
          "asset_id": "gesture_point",
          "text": "point toward the featured product"
        }
      ]
    }
  }
  ```
</RequestExample>
