For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrating via NPM

Use the Sentifyd npm packages to integrate an avatar into React, Vue, Next.js, or any modern JavaScript application, with full bundler integration and TypeScript support.

Two packages are available. Install the one that matches your avatar's voice mode (selected when the avatar was created):

Package
Voice mode
Component

Standard voices

<sentifyd-bot>

Real-time (speech-to-speech)

<sentifyd-realtime>

The examples below use sentifyd-bot; substitute sentifyd-realtime (and the matching import names) for real-time avatars.

Before you start, create and train an avatar on the Sentifyd platform, note its avatar ID and API key, and add your site's domain to the avatar's allowed domains (see the Quick Start Guide). The avatar will refuse to connect from domains that are not allowed.

Installation

npm install sentifyd-bot
# or
yarn add sentifyd-bot

Vite Configuration (Required)

The package requires a Vite plugin to correctly serve the 3D avatar's assets and the audio worklets used for lip-sync. Add it to your vite.config.js:

import { defineConfig } from 'vite';
import { sentifydBotPlugin } from 'sentifyd-bot/vite-plugin';

export default defineConfig({
  plugins: [
    sentifydBotPlugin()
  ]
});

For sentifyd-realtime, import sentifydRealtimePlugin from sentifyd-realtime/vite-plugin instead.

Framework Examples

React

The React wrapper also supports the onError, onOpen, and onClose callbacks.

Vue 3

Next.js

The component renders a 3D scene and accesses browser APIs, so it must be loaded client-side only:

Vanilla JavaScript

Configuration

Required props

  • apiKey (string): Your avatar's API key

  • avatarId (string): The avatar ID to use

Common optional props

  • toggler (boolean, default true): Show the floating toggler widget; set false to render embedded

  • compact (boolean, default false): Compact layout without header/footer

  • overlay (boolean, sentifyd-realtime only): Frameless, transparent overlay mode sized by your own CSS

  • brandName / brandLogo (string): Branding shown in the widget header

  • termsHref / privacyHref (string): Links to your terms and privacy pages

  • enableCaptions (boolean): Show live captions

The full attribute surface of the underlying web components (UI language, sizing, barge-in, consent injection, etc.) is documented in the Avatar Web Components Reference.

Styling

Customize the widget with CSS custom properties:

TypeScript Support

Both packages ship full TypeScript definitions:

API Reference

  • registerSentifydBot() — Registers the web component globally. Call once before using the <sentifyd-bot> element (e.g., in Vue or vanilla setups).

  • createSentifydBot(config) — Programmatically creates and mounts a bot instance. Returns the HTMLElement.

  • initializeStorage(storage) — Configures a custom storage adapter (getItem / setItem / removeItem) for mobile apps or special environments.

For sentifyd-realtime, the equivalents are registerSentifydRealtime() and createSentifydRealtime(config).