Getting Started
Installation

Installation

Avatarium provides SDKs for React and vanilla JavaScript.

React SDK (Recommended)

npm install @avatarium/react

The React SDK includes:

  • <Avatar /> component for rendering avatars
  • <AvatarProvider /> for managing state
  • useAvatar() hook for programmatic control

Core SDK

For non-React applications:

npm install @avatarium/sdk

Requirements

  • React: 18.0+ or 19.0+
  • Node.js: 18.0+ (for server-side rendering)
  • Browser: Chrome 90+, Firefox 90+, Safari 15+, Edge 90+

The SDK uses WebGL for 3D rendering and WebSockets for real-time communication. Ensure your target browsers support these features.

TypeScript

Both SDKs are written in TypeScript and include type definitions out of the box. No additional @types packages are needed.

import type { AvatarConfig, Message } from '@avatarium/react';
 
const config: AvatarConfig = {
  apiKey: 'av_live_xxxxx',
  avatarId: 'aria-001',
  aiProvider: 'groq',
};