Docs index: /llms.txt · every page as Markdown: add .md

‹ Overview

Talking avatar API from one photo

Create an avatar from one portrait with the API, then talk to it live.

Creator plan or higherAPI secret

Send one portrait to POST /v1/agent/generate and bitHuman creates a talking avatar from it in the bitHuman cloud. Then talk to the avatar in real time through the REST API, an SDK or the LiveKit plugin; the finished avatar runs anywhere its model runs.

Which model to use

Essence 2 renders a photoreal person from one portrait; Expression 2 renders any character (people, animals, cartoons) from one portrait.

You haveUse
A photo of a real personessence-2: photoreal, up to 1080p
A character, animal, robot or illustrationexpression-2: any subject
Not sureauto: people go to essence-2, everything else to expression-2

Every model except Expression 2 needs a clear, real human face. Always send model: an omitted model creates a first-generation Expression 1 agent.

Create the avatar

curl -X POST https://api.bithuman.ai/v1/agent/generate \
  -H "Content-Type: application/json" -H "api-secret: $BITHUMAN_API_SECRET" \
  -d '{"model": "auto", "prompt": "You are a friendly receptionist.", "image": "https://example.com/headshot.jpg"}'
{"success": true, "message": "Agent generation started", "agent_id": "A80HVD8577", "status": "processing"}

Poll GET /v1/agent/status/{agent_id} every few seconds until status is ready or failed. An Essence 2 avatar is ready in minutes; an Expression 2 avatar takes longer to build. Every step, with the voice and the persona: Create your own avatar.

What makes a good photo

One subject, in focus, facing the camera with a resting expression and the whole face visible (eyes, nose and mouth). The image is under 10 MB, at a URL that opens in a browser without signing in. For an animal or character, use expression-2 with a well-lit, front-facing photo and the face filling the frame.

What it costs to create

Creating your own avatar is a one-time 500 credits for Essence 2 (ready in a few minutes) or 2,000 credits for Expression 2 (it takes longer to build).

A failed creation is refunded automatically. API use needs the Creator plan or higher. Every rate is on Pricing.

Talk to it in real time

You are buildingUse
A web pagethe web embed: https://www.bithuman.ai/embed/<agent_id>
A LiveKit voice agentthe LiveKit plugin: bithuman.AvatarSession(avatar_id=…)
An iPhone, iPad, Mac or Android appthe Swift package or the Android SDK, rendering on the device
A backend or a scriptthe Python SDK, or the REST API
A quick check from the terminalthe CLI: bithuman run <agent_id>

To make a live avatar say a line from your backend, call POST /v1/agent/{agent_id}/speak.

A real-time session bills to the second at the rates on Pricing; rendering on your own hardware or on the device bills a lower rate than the bitHuman cloud.

Try a sample first

The wise-pup sample (Expression 2) runs in the web embed with no account or install:

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

Open the page, allow the microphone and talk: the avatar greets you and answers. A sample session ends after a minute. The sample avatars are sofia-ramirez (Essence 2) and wise-pup (Expression 2): Sample avatars.

Troubleshooting

SymptomCauseFix
402 INSUFFICIENT_BALANCEnot enough creditstop up (the error’s topup_url)
403 PLAN_REQUIREDa Free account, which cannot create agents, or a model outside your planchoose a plan (the error’s upgrade_url)
422 MODEL_SUBJECT_MISMATCHany model but expression-2 for a subject that is not a real person, or no face founduse expression-2 or auto
422 IMAGE_FACE_UNSUITABLEessence-2 with a face too small in frame, or several facesupload a closer photo of one person
failed with an image errorthe image URL is not publicly fetchablehost the image publicly and create again (the failed creation is refunded)