Skip to main content
The Anam API provides a simple interface for implementing digital AI personas within your web applications. This guide will walk you through the process of setting up a minimal example of an interactive AI persona. By the end, you’ll have a working persona that can have real-time conversations in your web browser.

Prerequisites

  • An Anam API key (get one here)
  • A modern web browser with microphone access
  • A local web server (we’ll show you how)

Run this with your own persona

Create a persona and API key in Anam Lab, then use them in the quickstart.

Create a persona

Configure the avatar, voice, model, and instructions for your persona.

Get an API key

Create the key used to authenticate the quickstart request.

Create Your First Persona

1

Create the HTML structure

Create a new file called index.html and add this basic structure:
index.html
2

Add the JavaScript

Now add the script that will automatically start your persona. Add this <script> tag just before the closing </body> tag:
3

Add your API key

Replace your-api-key-here with your actual Anam API key in the script.
4

Complete file example

Your final index.html file should look like this:
index.html
5

Start a local server

To serve your html file, you’ll need a local web server. You can use one of the following methods depending on which development tools you have installed.
6

Open and test

  1. Navigate to http://localhost:8000 in your browser
  2. Allow microphone access when prompted
  3. Cara will appear automatically and you can start talking!
  4. When you’re done, close the browser tab to end the session.

What just happened?

  • Obtaining a Session Token: Your API key was exchanged for a temporary session token that enables the persona connection
  • Establishing a WebRTC Stream: The Anam SDK established a real-time video/audio connection to display your persona
  • Voice Interaction: Cara listens to your microphone and responds with natural speech and facial expressions

What’s next?

Now that you have Cara running, here are some directions to explore:

Customize your persona

Change your persona’s appearance, voice, and personality

Build a full application

Create a complete app with proper client/server architecture

Handle conversation events

React when your persona speaks, listens, or encounters errors
Last modified on July 17, 2026