Skip to main content
This quickstart shows you how to connect to an Anam persona and receive audio and video frames.

Prerequisites

  • An Anam API key (get one here)
  • A persona ID from Anam Lab
  • The anam package installed (pip install anam)

Connect and stream

This connects to the persona and prints frame metadata as it arrives. Replace the print calls with your own rendering logic.
When you save SDK video frames to a file, set the output writer or muxer to 25 fps. This is an output encoding hint; session.video_frames() yields frames as they arrive. Encoding saved output at 30 fps can make audio and video drift out of sync.
Never expose your API key in client-side code. The Python SDK is designed for server-side use. See Usage in Production for session token patterns.

Send a message

You can send text to the persona during a session:

Use the event-driven API

If you prefer callbacks over async iterators:

Next steps

GitHub Repository

Source code, full API reference, and examples

Cookbook: Python BYO LLM

Bring your own LLM with the Python SDK
Last modified on July 3, 2026