Skip to content

Developers · Python

Avatars from Python on Mac and Linux

pip install "bithuman[expression-2]", load an avatar, push audio, and get lip-synced frames on your own machine — for desktop companions, kiosks and server pipelines. On Linux it renders both models on the CPU alone; a standard PC needs no GPU.

API and SDK use requires the Creator plan or higher.

Install

pip (in a virtual environment)
pip install "bithuman[expression-2]"

What you need: API secret (from the docs)

The full Python guide

  1. Add a conversation

    The Python SDK renders: audio in, lip-synced frames out. The conversation comes from your own code.

    • conversation.py in the quickstart

      Your microphone goes to OpenAI Realtime with your own key, and the avatar answers in a window on your machine.

      python/quickstart

    • The LiveKit plugin, for servers

      Give a LiveKit voice agent a face rendered on your own server, or a bitHuman cloud avatar. The worker holds your API secret as BITHUMAN_MASTER_SECRET and, for a cloud avatar, mints a one-hour token per session, so the secret stays on your server.

      LiveKit

    When the avatar renders in your app on the device and you use your own voice and language services, bitHuman receives usage metering only, never audio, video or conversation text.

Requirements

Python 3.10–3.14 on macOS 14 or newer with Apple silicon, or on Linux x86_64 or arm64.

More

What it costs

Credits per minute

On the device (Essence 2, Expression 2)
2
bitHuman cloud avatar
4
Managed voice chat (all-inclusive)
10

More

Not available on this platform

Intel Macs.

More

Before you ship

Keep the API secret on the machine that renders, in an environment variable or a secret store, never in source control. Give each app its own secret so you can rotate one without touching the others.

The full checklist

Examples you can clone

Questions? Ask on Discord

Join the bitHuman Discord