Skip to main content
The TruGen JavaScript SDK lets you embed interactive AI avatars directly into your web application. It handles the WebRTC connection, audio streaming, and event system — so you can focus on building your experience.
Or import directly in the browser via CDN:

When to Use the SDK

What the SDK Provides

  • Session management — create, connect, and disconnect avatar sessions
  • Real-time events — listen for speaking, transcript, connection, and mic events
  • Audio control — mute, unmute, switch devices, and inject custom audio
  • Media access — direct access to WebRTC video and audio tracks
  • Raw frame processing — feed frames into custom pipelines or canvas layouts

What’s Next?

Quickstart

Get your first AI avatar running in under 5 minutes.

Authentication

Learn how to secure your API key with server-side session tokens.

Examples

Full working examples in JavaScript and TypeScript.

Reference

Complete SDK reference for all methods and events.