Skip to content

Developers · Web

A talking avatar for your website or web app

Paste an iframe or load the floating widget. bitHuman's managed agent runs the conversation with your persona, and with your own language model or voice keys if you want them, so there is no voice server to run.

API and SDK use requires the Creator plan or higher.

Install

One iframe
<iframe src="https://www.bithuman.ai/embed/A23WJF0199" allow="microphone *" style="width:100%;height:600px;border:0"></iframe>

What you need: nothing (from the docs)

The full Web guide

  1. Add a conversation

    The avatar needs something to say. On the web, bitHuman's managed agent runs the whole conversation for you.

    • The managed agent (the default)

      Your persona is the agent's system prompt; the conversation runs on bitHuman's servers.

      Persona

    • Your own model, with no worker to run

      Point the agent at any OpenAI-compatible endpoint, or connect your own voice provider, through the Providers API.

      Providers

    • A LiveKit web client for your own agent

      Build your own video UI and subscribe to a cloud-rendered avatar in your LiveKit room.

      LiveKit

    With the web embed, the conversation runs on bitHuman's servers, even when the avatar renders in the tab.

  2. Transparent background

    AI characters made on a plain green backdrop can stand right on your page. Turn it on with one line.

    The green around the character is removed in the visitor's browser as each frame arrives, so nothing extra is sent over the network. A character without a green backdrop keeps its normal frame.

    The one line
    BitHumanGadget.init({ agentUrl, transparent: true })

    See Biscuit and Marmalade live Transparent background in the docs

  3. Where it renders

    In the bitHuman cloud by default, or in the visitor's tab with WebGPU (render=local), with no fallback to the cloud.

    With the web embed, the conversation runs on bitHuman's servers, even when the avatar renders in the tab.

    Render in the visitor's tab (docs)

  4. React and Next.js

    There is no npm package: the embed is an iframe in any framework. For a floating avatar, one script tag adds the website widget to any page, Next.js included.

    React
    export function Avatar({ code }) {
      return <iframe src={`https://www.bithuman.ai/embed/${code}`} allow="microphone *" style={{ width: "100%", height: 600, border: 0 }} title="Talking avatar" />;
    }

    Website widget, with a Next.js snippet (docs)

Requirements

HTTPS (or localhost) and allow="microphone *" on the iframe, or the browser blocks the microphone.

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

An npm package: the embed is an iframe, or one script tag for the widget, in any framework.

More

Before you ship

A public agent needs no credential in the page. A private agent needs an embed token that your server mints with your API secret, so the secret never reaches the browser. Embed tokens (docs) →

The full checklist

Examples you can clone

Questions? Ask on Discord

Join the bitHuman Discord