Prerequisites
- An Anam API key (get one here)
- A modern web browser with microphone access
- A local web server (we’ll show you how)
Create Your First Persona
Create the HTML structure
Create a new file called
index.html and add this basic structure:index.html
Add the JavaScript
Now add the script that will automatically start your persona. Add this
<script> tag just before the closing </body> tag: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.
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

