Migrate from Tavus
Tavus is a great product and we respect their team. If you're evaluating a move to Lookalike, this guide maps the calls you already make onto ours, side by side, so you can see exactly what changes. The Tavus snippets are shown for orientation against its v2 API.
Two things are worth knowing up front:
- One object instead of two. In Tavus you manage a replica for the face and a separate persona for the personality, then pair them per conversation. Here the personality and the pairing live on one identity, which points at an avatar (the face) and a voice; you create it once and reuse it by its
id. - LiveKit, not Pipecat. A Lookalike session runs over LiveKit. You start a session, get a room name, an access token, and a server URL back, and join with a LiveKit client. If your Tavus integration is built on Pipecat (Daily's open-source framework), swapping its client for the LiveKit client is the main change on the browser side.
How the concepts map
| Tavus | Lookalike | Notes |
|---|---|---|
| Replica | avatar (avt_…) | The visual likeness, made from a photo |
| Persona | identity (id_…) | Its system_prompt becomes the identity instructions |
| Voice on the persona | voice (voc_…) | Cloned from a reference audio clip |
| Replica + persona | one identity | Points at an avatar and a voice; can be created in a single call |
| Conversation | session (sess_…) | POST /v1/sessions |
conversation_url (Pipecat) | transport.url + transport.token | Join with a LiveKit client |
x-api-key header | Authorization: Bearer or X-API-Key | Keys start with lk_ |
| Conversational minutes | credits | One balance covers realtime usage |
If your LiveKit agent uses the Tavus plugin, you keep your agent, its voice, and its LLM, and swap only the face. tavus.AvatarSession(replica_id, persona_id) becomes lookalike.AvatarSession(identity_id), and the TAVUS_API_KEY environment variable becomes LOOKALIKE_API_KEY. The identity is a photo-only identity, which is free to create during the beta.
# Tavus
avatar = tavus.AvatarSession(replica_id=replica_id, persona_id=persona_id)
# Lookalike
avatar = lookalike.AvatarSession(identity_id=identity_id, on_error=on_avatar_error)
await avatar.start(session, room=ctx.room)
See Bring your own LiveKit agent for the full steps.
Authenticate
Tavus sends x-api-key; Lookalike sends a bearer token (or X-API-Key), and keys start with lk_. Get one in the console.
Tavus
curl https://tavusapi.com/v2/replicas -H "x-api-key: $TAVUS_API_KEY"
Lookalike
curl https://api.lookalike.com/v1/identities -H "Authorization: Bearer $LOOKALIKE_API_KEY"
Create the avatar
In Tavus this is two objects and an asynchronous wait: train a replica from a consent video, then create a persona bound to it. In Lookalike it can be one multipart call that carries the face, the voice, and the personality — your Tavus persona prompt moves over unchanged as instructions. You can also start from a stock avatar_id and voice_id instead of files.
Tavus
# 1. train a replica from a consent video (asynchronous — poll until ready)
curl -sS -X POST https://tavusapi.com/v2/replicas \
-H "x-api-key: $TAVUS_API_KEY" -H "Content-Type: application/json" \
-d '{ "replica_name": "Ada", "train_video_url": "https://example.com/ada-consent.mp4" }'
# -> { "replica_id": "r1a2b3c4", "status": "training" }
# 2. create a persona bound to that replica
curl -sS -X POST https://tavusapi.com/v2/personas \
-H "x-api-key: $TAVUS_API_KEY" -H "Content-Type: application/json" \
-d '{ "persona_name": "Ada",
"system_prompt": "You are Ada, a warm and concise product guide.",
"default_replica_id": "r1a2b3c4" }'
# -> { "persona_id": "p5f6g7h8" }
Lookalike
- cURL
- Python
- Node.js
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"
# -> { "id": "id_...", "object": "identity", "status": "creating", "pending": { "avatar_id": "avt_..." }, ... }
import httpx
with open("ada.jpg", "rb") as img, open("ada.wav", "rb") as aud:
resp = httpx.post(
"https://api.lookalike.com/v1/identities",
headers={"Authorization": f"Bearer {API_KEY}"},
data={
"name": "Ada",
"instructions": "You are Ada, a warm and concise product guide.",
},
files=[
("image", ("ada.jpg", img, "image/jpeg")),
("audio", ("ada.wav", aud, "audio/wav")),
],
)
resp.raise_for_status()
identity = resp.json() # { id, status: "creating", ... } — poll GET /v1/identities/{id} until "active"
import { openAsBlob } from 'node:fs';
const form = new FormData();
form.set('name', 'Ada');
form.set('instructions', 'You are Ada, a warm and concise product guide.');
form.set('image', await openAsBlob('ada.jpg', { type: 'image/jpeg' }), 'ada.jpg');
form.set('audio', await openAsBlob('ada.wav', { type: 'audio/wav' }), 'ada.wav');
const resp = await fetch('https://api.lookalike.com/v1/identities', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.LOOKALIKE_API_KEY}` },
body: form,
});
const identity = await resp.json(); // { id, status: "creating", ... } — poll GET /v1/identities/{id} until "active"
See Create an Identity for the full field list.
With a photo the identity is creating while its avatar is made, like a Tavus replica training. Poll GET /v1/identities/{id} until it is active. With a stock avatar_id there is nothing to wait for.
Start a session
Tavus creates a conversation from a replica_id plus a persona_id and returns a conversation_url. Lookalike starts a session from just the identity's id (identity_id) and returns the LiveKit room name, token, and URL.
Tavus
curl -sS -X POST https://tavusapi.com/v2/conversations \
-H "x-api-key: $TAVUS_API_KEY" -H "Content-Type: application/json" \
-d '{ "replica_id": "r1a2b3c4", "persona_id": "p5f6g7h8" }'
# -> { "conversation_id": "c9i8h7g6", "conversation_url": "https://.../c9i8h7g6" }
Lookalike
curl -sS -X POST https://api.lookalike.com/v1/sessions \
-H "Authorization: Bearer $LOOKALIKE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "identity_id": "id_3f9a2b7c4d1e8a05f6b3" }'
# -> { "id": "sess_...", "transport": { "url": "wss://...", "token": "eyJ...", ... }, ... }
The token is minted server-side and already encodes the room, so your browser never sees the API key. It is returned only on create. See Realtime API for the full response.
Pick the conversation language
Tavus sets the language under the conversation's properties. Lookalike takes it as a top-level language on the session, and falls back to the language stored on the identity when you omit it.
const s = await fetch(`${LOOKALIKE}/v1/sessions`, {
method: 'POST',
headers: { ...headers, 'Content-Type': 'application/json' },
body: JSON.stringify({ identity_id, language: 'es' }),
});
const { id, transport } = await s.json(); // transport.url, transport.token
Supported values are auto, en, es, pl, and uk. Tavus's max_call_duration maps to limits.max_duration_seconds (default 3600, at most 7200). The other Tavus conversation properties do not map.
Join the call
Tavus hands you a conversation_url that you open in your Pipecat client. Lookalike hands you transport.url + transport.token that you join with a LiveKit client.
Lookalike
import { Room, RoomEvent, Track } from 'livekit-client';
// livekitUrl and token are transport.url and transport.token from the POST /v1/sessions response
const room = new Room();
room.on(RoomEvent.TrackSubscribed, (track) => {
if (track.kind === Track.Kind.Video) {
document.getElementById('avatar').appendChild(track.attach());
} else if (track.kind === Track.Kind.Audio) {
document.body.appendChild(track.attach());
}
});
await room.connect(livekitUrl, token);
await room.localParticipant.setMicrophoneEnabled(true); // so the avatar can hear you
The agent listens and responds on its own, handling turns and interruptions natively — there is no push-to-talk. Transcripts arrive through LiveKit's own client SDK.
In a video session the avatar publishes both audio and video. Attach both, but don't also play the agent's raw voice track, or you'll hear it twice.
End the session
Tavus ends a conversation with an explicit call. Lookalike gives you both options: disconnect from the room, or call the End Session endpoint.
Tavus
curl -sS -X POST https://tavusapi.com/v2/conversations/c9i8h7g6/end \
-H "x-api-key: $TAVUS_API_KEY"
Lookalike
Disconnect the client:
await room.disconnect();
Or end it from your backend with the session's sess_ id:
curl -sS -X POST https://api.lookalike.com/v1/sessions/sess_4b9e02f1/end \
-H "Authorization: Bearer $LOOKALIKE_API_KEY"
Billing
Tavus meters conversational minutes. Lookalike meters credits from one balance: creating identities, avatars and voices is free, and a realtime session is charged per minute while the avatar is streaming. Buy credits and view usage in the Console; full rates are on the Billing & credits page. A request that would spend credits you don't have returns 402, and a live session that runs out ends on its own with end_reason: "insufficient_balance".
What's different
- One identity, not a replica plus persona. Change its instructions with
PATCH, or point it at another avatar or voice; the old ones keep serving until a new avatar is ready. - Stock avatars and voices. Start from a public avatar and voice and skip the wait entirely.
- Local file upload. You upload the reference image directly, rather than hosting it at a public URL first.
Next steps
- Core concepts — how identities, avatars, voices and sessions fit together.
- Create an Identity — the full create reference.
- Realtime API — the full session and join reference.
- Billing & credits — rates and how credits are charged.
- Bring your own LiveKit agent - move a LiveKit agent from the Tavus plugin to Lookalike.