SDK Reference
Overview

SDK Reference

The Avatarium SDK provides everything you need to add talking AI avatars to your application.

Packages

@avatarium/react

The React SDK provides components and hooks for building avatar experiences.

import { Avatar, AvatarProvider, useAvatar } from '@avatarium/react';

@avatarium/sdk

The core SDK for non-React applications.

import { Avatarium } from '@avatarium/sdk';

Quick Reference

Component/HookDescription
<Avatar />Main avatar rendering component
<AvatarProvider />Context provider for state management
useAvatar()Hook for controlling avatar programmatically
useMessages()Hook for accessing conversation history

Basic Usage

import { Avatar } from '@avatarium/react';
 
function App() {
  return (
    <Avatar
      apiKey="av_live_xxxxx"
      avatarId="aria-001"
      onMessage={(msg) => console.log('Received:', msg)}
      onError={(err) => console.error('Error:', err)}
    />
  );
}