Skip to main content

Create an Identity

An identity is what your users talk to: a name and instructions that point at an avatar (the face) and a voice. You create it once and reuse its id in the Realtime API.

The flow is:

  1. Pick a stock avatar and voice, or make your own.
  2. Create the identity from them.
  3. Poll it until it is active, then start a session.

Authentication​

Every /v1/* request needs an API key. Keys start with lk_. Send it either way:

HeaderValue
AuthorizationBearer lk_live_8f3c...
X-API-Keylk_live_8f3c...

A missing, invalid, or revoked key returns 401. The base URL is https://api.lookalike.com; every path below hangs off it. The examples read the key from $LOOKALIKE_API_KEY.

1. Pick an avatar and a voice​

Stock avatars and voices are public: true and free for every account to use:

curl -sS "https://api.lookalike.com/v1/avatars?public=true" -H "Authorization: Bearer $LOOKALIKE_API_KEY"
curl -sS "https://api.lookalike.com/v1/voices?public=true" -H "Authorization: Bearer $LOOKALIKE_API_KEY"
# -> { "data": [ { "id": "avt_stock_sophie", "object": "avatar", "status": "completed", ... } ], "next_cursor": null }

Play a voice with GET /v1/voices/{id}/preview.

Or make your own​

POST /v1/avatars makes an avatar from a photo of one person (image: JPEG, PNG or WEBP, at most 20 MB; optional name). It returns 202 with status: "pending" and finishes in the background.

curl -sS -X POST https://api.lookalike.com/v1/avatars \
-H "Authorization: Bearer $LOOKALIKE_API_KEY" \
-F "name=Ada" \
-F "image=@ada.jpg;type=image/jpeg"
{
"id": "avt_9c1e4b2a7f3d",
"object": "avatar",
"status": "pending",
"public": false,
"name": "Ada",
"avatar_model": null,
"image_url": null,
"thumbnail_url": null,
"background_url": null,
"mask_url": null,
"idle_closeup_video": null,
"crop": null,
"error": null,
"created_at": "2026-11-10T09:10:27Z",
"completed_at": null
}

An avatar moves pending → running → completed (or failed, with error.code and error.message). A completed avatar carries avatar_model (animatron-1 or animatron-2), its image, thumbnail, background and mask URLs, the idle_closeup_video shown while it is silent, and the face crop. An avatar never changes once completed — a new photo is a new avatar. You can point an identity at an avatar before it completes.

POST /v1/voices clones a voice from a recording of one speaker (audio, at most 20 MB; optional name). It returns 201 once the clone is ready, which takes up to about 90 seconds.

curl -sS -X POST https://api.lookalike.com/v1/voices \
-H "Authorization: Bearer $LOOKALIKE_API_KEY" \
-F "name=Ada" \
-F "audio=@ada.wav;type=audio/wav"
# -> { "id": "voc_5d2f8a1c", "object": "voice", "status": "completed", "public": false, "name": "Ada", ... }

2. Create the identity​

POST /v1/identities — multipart/form-data. Send exactly one of image or avatar_id, and exactly one of audio or voice_id.

FieldTypeRequiredNotes
nametextyesDisplay name, min length 1.
instructionstextyesWho the identity is and how it talks, min length 1.
avatar_idtextone ofAn avatar of yours, or a public one.
imagefileone ofA photo to make a new avatar from: image/jpeg, image/png, image/webp.
voice_idtextone ofA voice of yours, or a public one.
audiofileone ofA recording to clone a new voice from: audio/wav, audio/mpeg, audio/mp4. A 10–30 second clip is plenty.
languagetextnoConversation language. One of auto, en, es, pl, uk; defaults to auto.
curl -sS -X POST https://api.lookalike.com/v1/identities \
-H "Authorization: Bearer $LOOKALIKE_API_KEY" \
-F "name=Ada" \
-F "instructions=You are Ada, a warm and concise product guide." \
-F "avatar_id=avt_stock_sophie" \
-F "voice_id=voc_stock_sophie" \
-F "language=en"

To build from your own media in the same call, send files instead of ids:

curl -sS -X POST https://api.lookalike.com/v1/identities \
-H "Authorization: Bearer $LOOKALIKE_API_KEY" \
-F "name=Ada" \
-F "instructions=You are Ada, a warm and concise product guide." \
-F "image=@ada.jpg;type=image/jpeg" \
-F "audio=@ada.wav;type=audio/wav"

audio is cloned during the request (up to about 90 seconds), so the voice is set when the call returns. image starts a new avatar: the identity comes back creating with the avatar under pending.avatar_id, and moves onto it on its own when it completes.

Create returns 202 Accepted with the identity:

{
"id": "id_3f9a2b7c4d1e8a05f6b3",
"object": "identity",
"status": "creating",
"name": "Ada",
"instructions": "You are Ada, a warm and concise product guide.",
"language": "en",
"avatar_id": null,
"voice_id": "voc_5d2f8a1c",
"pending": { "avatar_id": "avt_9c1e4b2a7f3d" },
"created_at": "2026-11-10T09:10:27Z",
"updated_at": "2026-11-10T09:10:27Z"
}

3. Wait until it is active​

Poll GET /v1/identities/{id} until status is active. Only an active identity can open a session.

StatusMeaning
creatingIt has no avatar yet; the one in pending.avatar_id is being made.
activeReady for sessions.
updatingA new avatar is being made; the current avatar and voice keep serving sessions until it completes.
failedIts first avatar failed. Check the avatar's error, then point the identity at another avatar.

Once it's active, stream it live with the Realtime API.

Choose a language​

ValueBehavior
autoEnglish greeting, then follow the visitor's detected language
enAlways speak English
esAlways speak Spanish
plAlways speak Polish
ukAlways speak Ukrainian

language is optional and defaults to auto. It is stored on the identity and returned by create, get, and list endpoints. Prefer a voice recorded in the language you intend to pin - the model will pronounce the words correctly either way, but the speaker's accent carries over.

Anything outside the five values is rejected with 422 before the identity is created. A single session can override the stored value without changing it - see Start a Session.

Change an identity​

PATCH /v1/identities/{id} takes a JSON merge patch of name, instructions, language, avatar_id and voice_id; fields you leave out stay as they are. Pointing at another avatar or voice takes effect at once and returns 200. This is the usual way to change a face or voice: make it with POST /v1/avatars or POST /v1/voices, then repoint.

curl -sS -X PATCH https://api.lookalike.com/v1/identities/id_3f9a2b7c4d1e8a05f6b3 \
-H "Authorization: Bearer $LOOKALIKE_API_KEY" \
-H "Content-Type: application/merge-patch+json" \
-d '{ "avatar_id": "avt_9c1e4b2a7f3d", "voice_id": "voc_5d2f8a1c" }'

As a shortcut, send a multipart image and/or audio instead. A new voice is set at once; a new image returns 202 with the identity updating and the new avatar in pending.avatar_id. Sending an image while a new avatar is already being made returns 409 (job_pending). Identities made on lookalike.com can't change their face or voice through the API (409).

List and delete​

GET /v1/identities returns { "data": [...], "next_cursor": ... }, newest first. Pass next_cursor back as cursor for the next page; limit is at most 100. GET /v1/avatars and GET /v1/voices page the same way, and GET /v1/avatars?identity_id=... lists the avatars an identity points at.

DELETE /v1/identities/{id} returns 204; its avatar and voice remain. DELETE /v1/avatars/{id} and DELETE /v1/voices/{id} return 204, or 409 while an identity uses them and 403 for public ones.

Notes​

  • Create once, reuse forever. Reuse the same identity across as many sessions as you like.
  • active before sessions. A session won't open until the identity is active (409).
  • Share avatars and voices. Many identities can point at the same avatar and voice.

Additional resources​

  • Realtime API — stream the identity live in a LiveKit room.
  • API concepts — how identities, avatars, voices and sessions fit together.