Prerequisites
Anam API key
If you don’t have your API key or if you need to create a new one, see Get your API key.Installation
Install the SDK in your projectBasic Usage
The quickest way to start using the SDK is with a local development setupThis example uses the
unsafe_createClientWithApiKey
method. This is not
recommended for production use as it exposes your API key. See the Usage in
Production guide for secure implementation.DOM Elements
This quickstart example requires two DOM elements to stream to:- A video element to play the video stream of your persona
- An audio element to play the voice stream of your persona
autoplay
is used to start the stream as soon as the page loads. The
playsinline
attribute prevents the video from being played in fullscreen
mode on mobile devices.Full HTML Example
Below is a full html example using the snippets above.index.html
Next Steps
Usage in Production
Before taking the next steps to release your persona to real users, learn the
important considerations for using personas in production.