Visitors to your website can see your avatar and talk to it, in your voice. You choose which websites may show it. It's in beta: the code below won't change, but the avatar's page inside it will keep improving.
1. Get a key
Sign in, open your account, and create an embed key. List every website that will show the avatar, like example.com and www.example.com, or *.example.com for all subdomains. The account page gives you the code with your key and avatar filled in.
2. Paste the code
Put this where the avatar should appear:
<div data-avatarbly-avatar="AVATAR_ID" data-avatarbly-key="pk_YOUR_KEY"></div>
<script src="https://avatarbly.com/embed.js" async></script>
Optional attributes on the div: data-width (default 360, in pixels or any CSS size) and data-height (default 560).
From your own JavaScript
<script src="https://avatarbly.com/embed.js"></script>
<script>
Avatarbly.mount(document.getElementById('helper'), {
key: 'pk_YOUR_KEY', avatar: 'AVATAR_ID', width: 360, height: 560
});
</script>
No JavaScript
<iframe src="https://avatarbly.com/embed/v1/frame?key=pk_YOUR_KEY&avatar=AVATAR_ID"
title="Avatarbly avatar" allow="autoplay" referrerpolicy="strict-origin"
style="border:0;border-radius:16px;width:100%;max-width:360px;height:560px"></iframe>
What visitors can do
- See the avatar and hear its introduction (after they tap Play).
- Talk to it by typing. It answers in text and in your voice.
- Nothing else: no editing, nothing from your account, and none of your private memories or tools.
Keys and safety
- An embed key (
pk_…) is meant to sit in your page's code. It isn't a password. What protects it is the list of websites: the avatar refuses to show anywhere else. - Remove a key on your account page and every embed that uses it stops at the next visit.
- Each visit gets a fresh one-hour pass. A page left open longer reloads the avatar.
Limits
- Spoken replies count against your plan's monthly voice allowance, the same as your own conversations. Text is unlimited.
- Embedding is part of the Standard and Digital Twin plans. If a plan ends, its keys pause until it is paid again.
- Up to 10 keys per account. Visits are rate-limited per visitor and per key to keep your allowance safe.
The API
Make avatars for your own customers from your code: their photo, their voice and a short video of them reading one line in, a talking avatar out, then chat with it or embed it. It's prepaid: add credit in your console, and each call takes what it used. Making one avatar and a first conversation cost about $0.30 in our test.
Keys
Create a secret key (sk_live_…) in your console. It's shown once. Keep it on your server, never in a web page. Send it on every call:
curl https://avatarbly.com/v1/balance -H "Authorization: Bearer sk_live_YOUR_KEY"
Endpoints
GET /v1/balance: your credit, in dollars.GET /v1/usage?limit=50: what each call cost, newest first.GET /v1/pricing: the minimum balance for each call (no key needed).
Making an avatar
POST /v1/avatarswith{"name", "style", "photo": base64 JPEG, "consent": {"attested": true, "subject_name", "at"}, "look"?}. Styles:realistic-cartoon,soft-illustrated,bold-graphic. Answers{"id"}and starts drawing.GET /v1/avatars/{id}until a drawing is done (about 30 seconds), thenPOST /v1/avatars/{id}/pick{"try": 1}.POST …/drawasks for another drawing.- The script lines are in the status (
lines). For each,PUT /v1/avatars/{id}/lines/{n}with the recording (audio/wav,audio/webm,audio/mp4oraudio/mpeg). - A face video is required:
PUT /v1/avatars/{id}/lines/{n}/clipwith a short video (video/webmorvideo/mp4, with its sound) of the person reading that line. Line 2, "The quick brown fox…", is the best one. We use it to check that the avatar's mouth moves like theirs. Without one, the voice can't be made. POST /v1/avatars/{id}/voice{"action": "make"}, then{"action": "accept"}when the status shows the voice is ready. The avatar is then built (under a minute) and the status says"stage": "ready".- Optional:
GETandPOST /v1/avatars/{id}/personalizewith answers about the person. ThenPOST …/finalize.
Using it
POST /v1/avatars/{id}/chat{"message", "history"?}answers{"text", "audio", "timing"}. Fetch files named in an answer withGET /v1/avatars/{id}/files/{path}.- To put it on a website, create an embed key in your console. API avatars embed with spoken replies and web search, paid from your credit.
DELETE /v1/avatars/{id}removes everything: photos, drawings, recordings, the cloned voice and the name. It can't be undone.
Consent
Every avatar you make must be of a person who has agreed to it. The create call asks you to confirm that, with the person's name and when they agreed. Making an avatar of someone without their permission ends your access.
Errors
401the key is missing or wrong ·402your balance is below the call's minimum ·429too many requests ·503not open yet, or resting.- Every error is JSON:
{"error": {"type": "...", "message": "..."}}
Credit and charges
You buy credit and each call uses some of it. Making an avatar and chatting with one are charged by how much work they took, and your console shows every charge. You never choose a model or a provider; we handle that.
Minimum balance to start: making an avatar $2.00, a chat turn $0.05.
Need something else?
Callbacks when a visitor talks to your avatar, and theming: tell us what you need at [email protected]