Create your own avatar
Turn a portrait, a voice sample and a prompt into your own avatar.
An avatar is a face, a voice and a personality, packaged as one agent with a short code. Use a sample avatar to start, or create your own from one portrait.
Before you start
- Time: an Essence 2 avatar is ready in minutes; an Expression 2 avatar takes longer to build. Build with a sample avatar (
wise-pup) meanwhile. - An API secret on the Creator plan or higher, and credits for the creation (pricing).
- A portrait image at a public URL or as a
file_idfromPOST /v1/files/upload(or create one from a prompt). - Optionally, a voice sample for cloning: 30 seconds or more of clean speech from one speaker. Longer clean samples are fine; the whole file is used. Send it as
audiowith"attestation": {"attested": true, "variant": "a"}or the call returns400 VOICE_CLONE_ATTESTATION_REQUIRED(Clone a voice).
Steps
4 steps
1. Choose a model
You have Use A photo of a real person essence-2: photoreal, up to 1080pA character, animal, robot or illustration expression-2: any subjectNot sure auto: people go toessence-2, everything else toexpression-2Every model except Expression 2 needs a clear, real human face: see Choosing a model.
Expected
One
modelvalue:essence-2,expression-2orauto.2. Pick the inputs
Input Use for Limits Image the face under 10 MB; one clear figure, neutral expression, facing the camera, face unobstructed Voice voice cloning 30 seconds or more of clean speech, one speaker, no music (MP3, WAV or M4A); the whole file is used Prompt a description of the personality required when there is no image 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). For
essence-2, the face also has to be big enough in the photo: a head-and-shoulders or chest-up photo works best, and a photo from the thighs up or wider may be turned away with422 IMAGE_FACE_UNSUITABLE.The photo is checked before anything is charged; the refusals are in Troubleshooting. For an animal or character, use
expression-2with a well-lit, front-facing photo and the face filling the frame.Without a voice sample, a voice is generated to match the persona. Your prompt is a description: creation writes the avatar’s full system prompt from it, so the stored text is new and is not a copy of yours.
Without a prompt, a role is picked at random from a built-in list and the persona is written from that and the image. To store exact text, create the agent, wait until it is
ready, then update it with yoursystem_prompt; an update is saved as sent.Expected
An image URL that opens in a browser without signing in, under 10 MB, plus a voice sample and a prompt if you have them.
3. Create the agent
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": "YOUR_IMAGE_URL"}'The response carries an
agent_id. Creation takes minutes for Essence 2 and longer for Expression 2. You can also create an agent in the Console at bithuman.ai, where you pick the model.Expected
{"success": true, "message": "Agent generation started", "agent_id": "A80HVD8577", "status": "processing"}4. Wait until it is ready
Poll
GET /v1/agent/status/{agent_id}every few seconds untilstatusisreadyorfailed.Expected
statusisready: after a few minutes for Essence 2, or after a longer build for Expression 2.
All steps done.
Check it worked
Open https://www.bithuman.ai/embed/<agent_id> in a browser and talk to it, or bithuman run <agent_id>.
How creation works
Creation runs once, in the bitHuman cloud; the finished avatar then runs anywhere its model runs. Always send model: an omitted model creates a first-generation Expression 1 agent.
- Essence 2 generates a short video of the person from the portrait, then trains on it.
readymeans live sessions in the bitHuman cloud work at once. Talking videos and the device file need a second build, started by the owner’s first video or download request; it usually takes about 1.5 to 2 hours, longer if builds are queued. Until then a video answers a retryable409 VIDEO_MODEL_PREPARINGand a download a retryable404 MODEL_ARTIFACT_NOT_READY; neither is charged. - Expression 2 generates a portrait from your prompt when you send no image, plus an idle clip and a voice. A failed run is refunded; a completed one is not, so a second
generateis a second charge.
Request fields and every failure mode: Agents API.
Variations
- Write a better persona with the persona guide.
- Add another model later without re-creating the agent: add a model.
- Change the prompt at any time: update an agent.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
402 INSUFFICIENT_ | not enough credits | top up (the error’s topup_url) |
403 PLAN_ | a Free account, which cannot create agents, or a model outside your plan | choose a plan (the error’s upgrade_url) |
403 AGENT_ | your plan’s agent limit; existing agents keep working | delete an agent, or choose a plan |
422 MODEL_ | any model but expression-2 for a subject that is not a real person, or no face found | use expression-2 or auto |
422 IMAGE_ | essence-2 with a face too small in frame, or several faces | upload a closer photo of one person |
failed with an image error | the image URL is not publicly fetchable | host the image publicly and create again (the failed creation is refunded) |
| The likeness is off | a side profile, several people or poor light | crop to one front-facing person in good light |
| The voice sounds noisy | background noise or music in the sample | re-record in a quiet room |
| The live voice differs from the preview | the clone was not applied, or Realtime mode (a provider’s built-in voice) is on | check the voice your agent uses |
Next
- Agents API · Persona · Voices