Developers · beta

Your avatar, on your site.

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

Keys and safety

Limits

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

Making an avatar

  1. POST /v1/avatars with {"name", "style", "photo": base64 JPEG, "consent": {"attested": true, "subject_name", "at"}, "look"?}. Styles: realistic-cartoon, soft-illustrated, bold-graphic. Answers {"id"} and starts drawing.
  2. GET /v1/avatars/{id} until a drawing is done (about 30 seconds), then POST /v1/avatars/{id}/pick {"try": 1}. POST …/draw asks for another drawing.
  3. The script lines are in the status (lines). For each, PUT /v1/avatars/{id}/lines/{n} with the recording (audio/wav, audio/webm, audio/mp4 or audio/mpeg).
  4. A face video is required: PUT /v1/avatars/{id}/lines/{n}/clip with a short video (video/webm or video/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.
  5. 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".
  6. Optional: GET and POST /v1/avatars/{id}/personalize with answers about the person. Then POST …/finalize.

Using it

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

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.

Developer terms

Need something else?

Callbacks when a visitor talks to your avatar, and theming: tell us what you need at [email protected]