Back to the blog

November 19, 2026 · 11 min · engineering · api

.md

React talking avatar SDKs compared: server half, client half

As of November 2026, Realtime Avatar and Runway ship a React avatar component and hooks, Tavus generates React UI, and LiveAvatar and Anam are JS SDKs.

As of November 2026, two of the five live avatar vendors we checked publish an installable React component and hook for a talking avatar. Realtime Avatar's realtime-avatar/react entry has an AvatarCall component and a useAvatarCall hook, with five call status values (connecting, waiting, live, recovering, ended) and server route helpers that keep your API key off the browser. Runway's @runwayml/avatars-react has its own AvatarCall component and hooks, with a session endpoint you write using @runwayml/sdk. Tavus's @tavus/cvi-ui is a CLI that copies React components, hooks and a server route into your project, and its calls run in Daily rooms. HeyGen LiveAvatar and Anam ship JavaScript SDKs that you wrap in React yourself. Choose on three things: a component you can style, a server route that holds the key, and a React Native path.

Each vendor below was read from its own repository or docs on 16 November 2026 (links at the end), and the Realtime Avatar code here was type-checked against the current realtime-avatar package on npm.

React support by vendor, as of November 2026

  • Realtime Avatar (installable component and hook, server route helper, React Native entry): package realtime-avatar, React entry realtime-avatar/react. Component: AvatarCall. Hook: useAvatarCall, which returns { call, view }. Server route: createRealtimeAvatarRoute from realtime-avatar/nextjs, or realtimeAvatarServerRoute from realtime-avatar/tanstack-start, mounted as one catch-all route. Call states: status is connecting, waiting, live, recovering or ended, with onStatusChange and an onEnded reason. React Native: a separate entry, realtime-avatar/react-native, lower level than the web component. Transport: LiveKit. Source: Realtime Avatar docs, read 16 November 2026.
  • Runway (installable component and hooks, session endpoint you write, no React Native listed): @runwayml/avatars-react, built on the framework-agnostic @runwayml/avatars core. Component: AvatarCall with avatarId and connectUrl, which per the README handles session creation and the WebRTC connection and renders a default UI with video and controls; AvatarProvider is the headless option. Hooks: useAvatarSession, useAvatar, useLocalMedia, useTranscript; call state comes from hooks such as useAvatarSession. Server route: your server creates a realtime session with @runwayml/sdk and returns credentials (Next.js and Express setups documented); the README says never to expose RUNWAYML_API_SECRET to the client. Transport: WebRTC, and both packages in the repository list livekit-client as a dependency, so it runs over LiveKit. React Native: none listed; the README gives browser support only. Source: runwayml/avatars-sdk-react repository, read 16 November 2026.
  • Tavus (React components, hooks and a server route generated into your project; React Native through Daily): @tavus/cvi-ui, a CLI that copies React components, hooks, styles and optional server helpers into your project, not a hosted widget. Components: CVIProvider, the Conversation block (takes a conversationUrl and calls onLeave), HairCheck, media controls, captions, chat and AudioWave. Hooks: call lifecycle, media state, participants, captions, chat and CVI events. Server route: add tavus-api generates a backend route for Next.js, Remix or TanStack Start plus createTavusConversation and endTavusConversation helpers, keeping TAVUS_API_KEY server-only; client-only Vite is unsupported. Transport: Daily rooms (the conversation_url). React Native: Daily's React Native SDK, joining the same conversation_url. Source: Tavus docs, read 16 November 2026.
  • HeyGen LiveAvatar (JavaScript SDK, no React component or hook): @heygen/liveavatar-web-sdk, a client-side SDK. Your backend fetches a session token, the browser creates a LiveAvatarSession with it, then calls start() and stop(). The README describes its rtcConfig option as WebRTC settings for the LiveKit connection, so the transport is LiveKit. React Native: not covered by the SDK README. Source: liveavatar-web-sdk README, read 16 November 2026.
  • Anam (JavaScript SDK, no React package listed): @anam-ai/js-sdk. Anam's SDK page names its JavaScript and Python SDKs, official integrations such as Pipecat, and community SDKs, but no React package. In the browser you call createClient(sessionToken), then streamToVideoElement with the id of a video element. Server route: your server trades the API key for a session token, valid for 1 hour, and the client then opens a direct WebRTC connection. Mobile: community-maintained Kotlin Multiplatform and Flutter SDKs; no React Native SDK is listed. Source: Anam docs, read 16 November 2026.
  • LiveKit Agents avatar plugins (a face for a voice agent you already run on LiveKit): LiveKit lists avatar plugins for Anam, Beyond Presence, D-ID, LemonSlice, LiveAvatar, Runway, Simli, Tavus and others. The avatar joins the room as a separate worker, and in React the useVoiceAssistant hook returns the agent with the worker's audio and video tracks. LiveKit's frontend starters include Next.js and React Native with Expo. Source: LiveKit docs, read 16 November 2026.

Two patterns stand out. Of the five vendors, only Realtime Avatar and Runway publish a React component package you render in one line, and both run their calls over LiveKit; Tavus generates its React components into your source tree, where you own and edit them like application code, runs calls in Daily rooms, and offers @tavus/embed when you do not need to own the UI. LiveAvatar and Anam give you a session-token pattern and a JavaScript client, and leave the React wrapper, with its effect, cleanup and loading states, to you. Every vendor here, except Tavus's embed, expects your server to mint the session, so plan for one backend route whichever you pick. None of them asks you to write RTCPeerConnection code yourself: each SDK wraps WebRTC, through LiveKit, Daily or its own client.

The minimal Realtime Avatar path: one route, one component

Your API key must never reach a browser, so the browser talks to your app and your app talks to Realtime Avatar. One server function is that endpoint: it decides who may start a call and what the character knows when they do. In the Next.js App Router it lives in a catch-all route, because one handler answers POST /connect, POST /end, GET /avatars and GET /credits under one prefix.

// app/api/realtime-avatar/[...path]/route.ts
import { createRealtimeAvatarRoute } from "realtime-avatar/nextjs";

export const { GET, POST } = createRealtimeAvatarRoute({
  // Server-only. Never give it a NEXT_PUBLIC_ prefix.
  apiKey: process.env.REALTIME_AVATAR_API_KEY!,

  // Who may do this. Return a Response to refuse, nothing to allow.
  authorize: async ({ request, operation }) => {
    const user = await currentUser(request); // your auth
    if (!user) return new Response("Unauthorized", { status: 401 });
    // "connect" is the only operation that costs money to start.
    if (operation === "connect" && !(await hasCredits(user))) {
      return Response.json({ code: "insufficient_credits" }, { status: 402 });
    }
  },

  // What the character knows for THIS call. The browser cannot override it.
  session: async ({ avatarId }) => ({
    instructions: promptFor(avatarId), // your prompt
    maxSeconds: 300, // hard cap for this call
  }),
});

Everything the session callback returns is authoritative: whatever the browser sends for the persona, the memory, the voice or the time limit is discarded before the request leaves your server, and a field you do not set is absent rather than inherited. Set maxSeconds on day one, because it is what stops a call your balance cannot cover. Connect is the only operation that costs money to start, so the credit check in authorize runs for that operation only and the reads stay cheap. On TanStack Start the same route is realtimeAvatarServerRoute from realtime-avatar/tanstack-start in a $ splat route, and on Cloudflare Workers you pass the key as a factory, since there is no process.env.

On the client, install the SDK and the peers its React entry imports, then render one component pointed at that route.

npm install realtime-avatar zod livekit-client @livekit/components-react
"use client";
import { useState } from "react";
import { AvatarCall, createProxyClient } from "realtime-avatar/react";

const client = createProxyClient({ proxyUrl: "/api/realtime-avatar" });

export function AvatarPanel({ avatarId }: { avatarId: string }) {
  const [inCall, setInCall] = useState(false);
  if (!inCall) return <button onClick={() => setInCall(true)}>Start call</button>;

  return (
    <AvatarCall
      client={client}
      avatarId={avatarId}
      onStatusChange={(status) => console.log("Call status:", status)}
      onEnded={({ reason }) => {
        console.log("Call ended:", reason);
        setInCall(false);
      }}
    >
      {(call) =>
        call.status === "waiting" ? <p>In line: {call.queuePosition}</p> : null
      }
    </AvatarCall>
  );
}

AvatarCall handles the queue, reconnects, the idle timer and the video surface. In Next.js the file needs "use client", because the call holds a WebRTC room and browser media that do not exist in a server component, and you import it with ssr: false; in TanStack Start, gate it on a mounted flag or load it lazily. The Start button means a page load never opens a call. To test before you create a character, pass the public example avatar id seed-rin-ashfall, and set poster and idleVideoUrl so the character is on screen while the call connects.

Your own layout with useAvatarCall

AvatarCall draws your children on top of the video. When you want your own layout around the video instead, for example the one v0 or Lovable generated for you, useAvatarCall returns { call, view }: put view in your video slot and drive your own controls from call.

import { createProxyClient, useAvatarCall } from "realtime-avatar/react";

const client = createProxyClient({ proxyUrl: "/api/realtime-avatar" });

// The SDK ships no strings, so the labels are yours: one per status value.
const LABEL = {
  connecting: "Connecting...",
  waiting: "In line",
  live: "Live",
  recovering: "Reconnecting...",
  ended: "Call ended",
};

export function CustomCall({ avatarId }: { avatarId: string }) {
  const { call, view } = useAvatarCall({ client, avatarId });
  const place = call.status === "waiting" && call.queuePosition !== null ? ` (#${call.queuePosition})` : "";

  return (
    <div className="call-layout">
      <div className="call-stage">{view}</div>
      <aside>
        <p role="status">{LABEL[call.status] + place}</p>
        {call.secondsRemaining !== null && <p>{call.secondsRemaining} s left</p>}
        <button onClick={() => call.end()} disabled={call.status === "ended"}>
          End call
        </button>
      </aside>
    </div>
  );
}

The handle also has say(), sayAndEnd(), keepAlive() and end(), plus secondsRemaining for a countdown.

Building product UI from call state

Build the interface from the SDK's call status, actions and end reasons. The standard call flow does not require Room, Participant, Track or WebRTC objects, and the SDK ships no strings, so you write the copy for the states you care about. One workable mapping:

  • connecting: show the poster or idle clip with a Connecting label.
  • waiting: the call is holding a place in line; show call.queuePosition as a position rather than an error message.
  • live: the character is on the call; hide loading UI and show your controls, such as End call and a text box wired to call.say().
  • recovering: a network blip that the SDK reconnects on its own; show a quiet Reconnecting notice and keep the call mounted.
  • ended: the call is over and onEnded receives the reason; branch your end screen on that reason, then unmount the call.

Keep transport detail out of that default flow. Call state, transport quality and actual media presentation answer different questions: a connected room or an available track does not prove that a frame appeared on the user's screen. LiveKit owns transport recovery, Realtime Avatar owns session preparation, capacity and fresh grants, and your product decides which notice or retry control to show.

What the status does not tell you is who is talking. The five values describe the call, not each turn, and the documented handle has no speaking flag; the moving face is the speaking indicator. A separate speaking badge is custom work below the standard flow, so check the React docs for the current primitives first.

React Native

React Native uses the same session logic with native media, from a separate entry point, realtime-avatar/react-native. Call registerGlobals() once at app startup, and give createProxyClient an absolute proxyUrl, because native has no page origin. The one-component AvatarCall wrapper is web-only for now: on native you compose RealtimeAvatarLiveKitRoom, SessionLifecycleRoomBridge and AvatarVideoSurface around useSessionLifecycle, and pick your own video player for the idle clip, such as expo-video or react-native-video. Live media does not run in Expo Go; you need a development client or an EAS build.

import { createProxyClient, registerGlobals } from "realtime-avatar/react-native";

registerGlobals(); // once, at app startup

// Native has no page origin, so the proxy URL must be absolute.
export const client = createProxyClient({
  proxyUrl: "https://your-app.example.com/api/realtime-avatar",
});

For comparison, Tavus sends native apps to Daily's React Native SDK with the same conversation_url, Anam lists community Kotlin Multiplatform and Flutter SDKs, and the LiveAvatar and Runway READMEs cover the browser. Our React Native and Expo guide has the full native call screen.

Which one to choose

  • A component you can drop in and style, with a server route that keeps the key off the browser: Realtime Avatar (AvatarCall plus createRealtimeAvatarRoute) or Runway (AvatarCall plus a session endpoint you write with @runwayml/sdk).
  • You want no backend at all: Tavus's @tavus/embed, which Tavus says is faster and needs no backend. Realtime Avatar, Runway, LiveAvatar and Anam's JavaScript SDK all expect your server to mint the session, which is also what keeps the API key out of the browser.
  • You want to own the call UI code: Tavus's generated cvi-ui components, which live in your source tree, or Realtime Avatar's useAvatarCall, which hands you the video view and the call handle for your own layout and controls.
  • You are already on Tavus: use @tavus/cvi-ui with its tavus-api route. You do not need your own Daily account, because the conversation_url Tavus returns is the Daily room.
  • Web and React Native from one vendor: Realtime Avatar's native entry, which is lower level than its web component, or Tavus through Daily's React Native SDK.
  • Your voice agent already runs on LiveKit Agents or Pipecat and only needs a face: a LiveKit avatar plugin (Tavus, Anam, LiveAvatar, Runway, Simli, Beyond Presence and others) or Anam's official Pipecat plugin. Realtime Avatar does not fit this case: it has no renderer-only mode that lip-syncs audio streamed from your own voice agent.
  • You want listening, turn-taking, the reply and the video handled for you, with your own tools in the call: Realtime Avatar, plus voiceWebhook (voice_webhook on the wire, SDK 0.28.0 or later) if the character should use your own text-to-speech.

Where Realtime Avatar is not the right fit

  • Putting a face on a voice agent you already built: not offered; a LiveKit avatar plugin fits better.
  • React Native as a one-liner: AvatarCall is web-only for now, so native calls are composed from lower-level parts.
  • A per-turn speaking indicator: the documented status covers the call lifecycle only.
  • Your own LLM endpoint as a self-serve switch: external model endpoints are enabled per workspace on request. Driving each turn from your own agent loop through sendTurn is self-serve.

Realtime Avatar is metered by the second. The free Sandbox includes 480 credits once per account, no card: 8 realtime minutes, or your first avatar plus 2 minutes of calls. Starter is $9 a month with 120 minutes included, then $0.095 a minute, and 3 concurrent streams; Developer is $24 a month with 600 minutes included, then $0.085 a minute, and 10 concurrent streams (Realtime Avatar pricing, November 2026). Worked example: 60 five-minute test calls is 300 minutes. On Starter that is 180 minutes beyond the included 120, so $9 plus 180 minutes at $0.095, or $26.10 for the month. On Developer the 300 minutes fit inside the 600 included, so the month costs $24. For other vendors' per-minute rates, use the dated all-in cost table linked below rather than a number from memory.

FAQ

What is the best SDK for embedding a live talking avatar in a React web app?

For a real React component plus a server route, the shortlist as of November 2026 is Realtime Avatar (AvatarCall and useAvatarCall, with createRealtimeAvatarRoute on the server), Runway (@runwayml/avatars-react, with a session endpoint you write using @runwayml/sdk) and Tavus (@tavus/cvi-ui, generated into your project with a tavus-api route). HeyGen LiveAvatar and Anam are JavaScript SDKs you wrap yourself. Then decide on three questions: do you need React Native, do you already run a voice agent that only needs a face (then a LiveKit avatar plugin, not Realtime Avatar), and what does a month of your call minutes cost on each plan.

Is there an official React SDK for HeyGen LiveAvatar, or do I wrap the web SDK myself?

You wrap it. The README we read on 16 November 2026 describes a JavaScript client built around LiveAvatarSession, with no React component or hook. In React, fetch a session token from your backend route inside an effect, create the session, call start(), and call stop() in the cleanup so an unmount ends the call.

How do I use Anam's JavaScript SDK in a React app? Is there an official hook?

There is no React package on Anam's SDK page. Create the session token on your server (valid for 1 hour) and return it from a route; then, in a useEffect, call createClient(sessionToken) and streamToVideoElement with your video element's id, and shut the client down on unmount.

What React components does Tavus provide for embedding a conversational video avatar?

Run npx @tavus/cvi-ui@latest init, then add conversation, which writes the Conversation block with the components and hooks it needs, and add tavus-api, which writes the server route. You wrap the app in CVIProvider; HairCheck, captions, chat and AudioWave come from the same library. If you do not need to own conversation creation or the UI, Tavus says @tavus/embed is faster and needs no backend.

Do I need a Daily account for Tavus? Which avatar APIs run on LiveKit with a ready React component?

No: Tavus's FAQ says you do not need a Daily account; the conversation_url its API returns is the Daily room, and that is all you need. If you would rather be on LiveKit, two of the vendors compared here ship a ready React component over LiveKit: Realtime Avatar (AvatarCall, and the standard flow never hands you a room to manage) and Runway (avatars-react, whose packages depend on livekit-client). HeyGen LiveAvatar's web SDK also connects over LiveKit but ships no React component. If you are building your own LiveKit voice agent, use a LiveKit avatar plugin (Tavus, Anam, LiveAvatar, Runway, Simli and others are listed) with LiveKit's useVoiceAssistant hook and its Next.js starter.

How do I build my own layout and controls around the avatar video with useAvatarCall?

Render the view from useAvatarCall({ client, avatarId }) wherever your layout puts video, read call.status, call.queuePosition and call.secondsRemaining for labels, and wire buttons to call.end() and call.say(). The CustomCall example above is complete.

v0 made my UI. How do I show connecting and avatar-is-speaking states from a live call?

Keep v0's layout and swap its placeholder video for the view from useAvatarCall. Map connecting and waiting to loading, live to on air, recovering to a reconnecting notice and ended to the end screen. Speaking is not a status value; the face shows it. Our v0 guide has a copy-paste prompt for the route and component.

Compare and cost guides

Meet the live avatars. Hold the first conversation.

Enter the studio