Back to the blog

November 23, 2026 · 12 min · api · product

.md

Resell avatar calls: per-client keys, spend limit errors, usage

Per-client Realtime Avatar API keys with spend limits, per-session usage to invoice by the minute, and how LiveAvatar, Anam and Tavus compare, Nov 2026.

On Realtime Avatar, give each client its own private API key with configurable permissions (scopes) and its own spend limit, tag every call with client_metadata such as user_id, and read GET /usage/sessions?endUserId= for that client's sessions: when each ran, how long it was billable for and what it cost. Sum only settled rows (status released or failed). A key that reaches its limit is refused with a 402 spend_limit_exceeded, so one client stops at its own cap instead of draining credits meant for the others. When the client should own the account and the bill, put them in a separate workspace. On the Developer plan ($24 a month for 600 minutes, 10 concurrent streams), ten client sites at 100 minutes each come to $58 a month. HeyGen LiveAvatar and Anam also list sessions by API key, and Tavus's conversation list has no duration or cost field; the comparison is below.

Below: which APIs support this, setup, an invoice script, a 10-site cost comparison, pricing, handover and a same-day demo. Competitor prices and API details are as of November 2026, read on each vendor's own page on 16 November 2026 and linked at the end.

Which realtime avatar APIs support per-client keys and per-session usage

  • Realtime Avatar: one key per client, each with its own scopes and spend limit, refused with 402 spend_limit_exceeded at the cap. GET /usage/sessions returns each session's start time, billable seconds, cost and settled or pending status, and narrows to one client or end user tagged in client_metadata.user_id.
  • HeyGen LiveAvatar: List Sessions (active or historic) can filter by api_key_id and returns each session's duration, credits consumed and the API key that created it. This post did not find a per-key spend limit in the pages it read.
  • Anam: keys are full access or restricted per resource. List sessions filters by API key ID and returns start and end time, length in milliseconds, your client label and metadata, but no cost field, so multiply by your plan rate. Its pricing page lists a spend cap on extra minutes; its API key page describes no per-key spend limit.
  • Tavus: List Conversations returns each conversation's status and created and updated times, not its duration or cost. Its pricing page lists white-labeled APIs from the Free plan up and a 100% white-labeled experience on Enterprise.
  • Talking Avatar Voice Agents: a no-code agent built in their dashboard and billed per second from prepaid credits. Its pricing page shows each session's cost on the dashboard Usage page and an optional account-wide monthly spending limit, and describes no per-key cap.

Pick by the requirement. A hard cap per client key plus a cost on every session row: Realtime Avatar documents both. Session duration and credits by key with no concurrency ceiling: LiveAvatar Essential, from $99 a month. Duration by key, with read or write permissions set per resource on each key: Anam, priced yourself from the plan rate. A no-code embed under one account-wide monthly cap: Talking Avatar's voice agents. Your clients should not see the vendor's brand: Tavus's pricing page lists white-labeled APIs, and Anam (Explorer and up) and Talking Avatar ($19 a month) sell watermark removal.

Per-client setup: one key, one cap, one tag

Start with one workspace on a paid plan. Every key in a workspace calls real services and draws on the same credit balance; there is no separate test or sandbox mode. What separates clients is the key each client's deployment holds and the tag on each call. Create keys in Settings, API keys, or over the API with POST /api-keys (scope api_keys:write), which takes four fields:

  • name: required. Name it after the client (client-acme-dental).
  • scopes: optional. Omitted, a new key gets realtime:write, credits:read and avatars:read, which starts calls and reads but writes no avatars. A client site that starts calls on one fixed avatar needs only realtime:write (start and end calls). Leave avatars:read off a client key: it lists and fetches avatars, and in a shared workspace that includes your other clients' characters. Keep usage:read and api_keys:write on a back-office key.
  • spendLimitCreditMicros: optional. The most this key may spend, in credit micros (millionths of a credit). A credit is one second on air: the Developer plan's 36,000 credits are its 600 minutes. So a cap of 9,000 credits, 150 minutes, is 9,000,000,000.
  • expiresAt: optional. An end date that matches the client's contract.

The creation response includes the full key, and workspace owners and admins can copy it again from Settings while it is active and unexpired. REST endpoints such as keys take camelCase bodies:

// mint-client-key.ts: run from your own back office, never from a client site.
// RTA_ADMIN_KEY is a key with the api_keys:write scope that stays on your server.
export async function mintClientKey(clientId: string, capCredits: number, expiresAt: string) {
  const res = await fetch("https://realtimeavatar.ai/api/v1/api-keys", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.RTA_ADMIN_KEY ?? ""}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      name: `client-${clientId}`,
      scopes: ["realtime:write"], // start and end calls, nothing else
      spendLimitCreditMicros: capCredits * 1_000_000, // 1 credit = 1 second on air
      expiresAt,
    }),
  });
  if (!res.ok) throw new Error(`POST /api-keys failed: ${res.status}`);
  const created: { id: string; apiKey: string; spendLimitCreditMicros: number | null } = await res.json();
  return created; // store created.apiKey as that client's server-side REALTIME_AVATAR_API_KEY
}

// 150 minutes for a client (here a hypothetical "acme-dental") until its contract ends:
// await mintClientKey("acme-dental", 9_000, "2027-06-30T23:59:59Z");

How the cap behaves:

  • It fails closed. A call past the cap is refused with HTTP 402 and code spend_limit_exceeded (an empty wallet gives insufficient_credits). The API reference says to surface it as a paywall, not a connection failure, so the site should show an unavailable message.
  • It is enforced against the wallet, so on a workspace billed as unlimited it is only a note.
  • Caps are per key, not money set aside: every key draws on the one workspace balance. Keep the sum of your clients' caps within what the workspace holds, or a busy client can empty the balance before the others reach their caps, and they get insufficient_credits.
  • It is not a monthly budget. The docs describe no reset, and the dashboard calls it the total credits a key can spend over its lifetime (it adds no credits). Size the cap to the contract term or rotate the key each billing period, set expiresAt, and when a client needs more room, create a replacement key with a higher limit and revoke the old one.
  • Live calls hold a reservation while they run, so a key near its cap can be refused before every second is spent.
  • It caps money, not concurrency. All keys share the plan's concurrent streams (3 on Starter, 10 on Developer, 20 on Studio), so a burst on one site can take slots another client needs.
  • A 403 means the key lacks a scope: mint a key with that scope rather than widening it to *.

Tag every call with the client

The cap controls spend; the tag makes usage attributable. Your server sets the call policy, and whatever the browser sends for those fields is discarded. Put the client's ID in client_metadata.user_id (metadata in the SDK's policy), because that is the field the usage endpoint filters on. With the Next.js route adapter from the realtime-avatar package, one route per client site looks like this:

// app/api/realtime-avatar/[...path]/route.ts, deployed on one client's site
import { createRealtimeAvatarRoute } from "realtime-avatar/nextjs";

const CLIENT_ID = process.env.AGENCY_CLIENT_ID ?? ""; // for example "acme-dental"
const AVATAR_ID = process.env.CLIENT_AVATAR_ID ?? "";

export const { GET, POST } = createRealtimeAvatarRoute({
  apiKey: () => process.env.REALTIME_AVATAR_API_KEY ?? "", // this client's key; never NEXT_PUBLIC_
  // The route also answers GET /avatars and GET /credits; a client site needs neither.
  authorize: ({ operation }) =>
    operation === "connect" || operation === "end" ? undefined : new Response("Not found", { status: 404 }),
  session: ({ avatarId }) =>
    avatarId === AVATAR_ID
      ? {
          instructions: "You answer the front desk for Acme Dental. Short spoken sentences.",
          maxSeconds: 300,
          metadata: { user_id: CLIENT_ID, site: "acme-dental-website" },
        }
      : new Response("Unknown avatar", { status: 404 }),
});

maxSeconds is also what stops a call your balance cannot cover, so set it for every client. A SaaS that rebills its own end users puts the signed-in user's ID in user_id and the tenant in a second pair such as client_id; endUserId filters only on user_id, so group per-tenant totals by metadata in your own code.

Pulling usage for an invoice

GET /usage/sessions (scope usage:read) is per-session billing detail: when each session ran, how long it was billable for, and what it cost. The API reference says it is what reconciles an invoice or re-bills your own users; the dashboard aggregate can do neither. The rules that matter:

  • Window: defaults to the trailing 30 days, clamped to 90. A wider range is served narrowed, not refused, so read back the returned from and to.
  • Paging: follow nextCursor until it is null. Ordinary pages allow up to 200 rows.
  • Filter: endUserId returns one of your users' sessions when the call was tagged with client_metadata.user_id.
  • Status: only released and failed are settled. released is a normal call and carries the charge; failed is terminal and always bills 0. reserved (a slot that never became a call) and started (still in flight) show 0 provisionally, and a started row can carry a different number tomorrow. Treat both as pending, not free.
// invoice.ts: run on your own server with a key that has the usage:read scope.
type UsageRow = {
  sessionId: string;
  status: "reserved" | "started" | "released" | "failed";
  startedAt: string | null;
  activeSeconds: number | null;
  billedCreditMicros: number | null;
  metadata: Record<string, unknown>;
};
type UsagePage = { data: UsageRow[]; nextCursor: string | null; from: string; to: string };

export async function clientMonth(clientId: string, from: string, to: string) {
  const released: UsageRow[] = [];
  const pending: UsageRow[] = [];
  let cursor: string | null = null;
  do {
    const query = new URLSearchParams({ from, to, endUserId: clientId, limit: "200" });
    if (cursor) query.set("cursor", cursor);
    const res = await fetch(`https://realtimeavatar.ai/api/v1/usage/sessions?${query}`, {
      headers: { Authorization: `Bearer ${process.env.RTA_USAGE_KEY ?? ""}` },
    });
    if (!res.ok) throw new Error(`GET /usage/sessions failed: ${res.status}`);
    const page: UsagePage = await res.json();
    for (const row of page.data) {
      if (row.status === "released") released.push(row); // settled, carries the charge
      else if (row.status !== "failed") pending.push(row); // reserved or started: not final yet
    }
    cursor = page.nextCursor;
  } while (cursor);

  const seconds = released.reduce((sum, row) => sum + (row.activeSeconds ?? 0), 0);
  const credits = released.reduce((sum, row) => sum + (row.billedCreditMicros ?? 0), 0) / 1_000_000;
  return { sessions: released.length, pending: pending.map((row) => row.sessionId), minutes: seconds / 60, credits };
}

// November 2026 for one client, run after the month has closed:
// await clientMonth("acme-dental", "2026-11-01T00:00:00Z", "2026-12-01T00:00:00Z");

Run it a day or two after the month closes and bill the released rows. The window is filtered by when each session was created, so if a November row is still pending, run the same November window again later: a started row settles when the session is released. billedCreditMicros is what each session drew from your balance.

A worked example with made-up numbers for a hypothetical client, Acme Dental, for November 2026: 41 rows come back, 37 released with 5,580 billable seconds (93 minutes, 5,580 credits), 3 failed at 0, and 1 reserved slot that never became a call. On Developer, if all 93 minutes fall past the 600 included, they cost you 93 x $0.085 = $7.91; at the 10-site average below ($0.058 a minute) they are $5.39. Priced with two models from the pricing section:

Acme Dental (hypothetical), November 2026 (UTC)
Released sessions     37
Billable time         93 min (5,580 s)
Failed / pending      3 / 1   (not billed)

Allowance model       $49 a month, 100 min included   -> $49.00
Pass-through model    93 min x $0.25                  -> $23.25

To reconcile your own Realtime Avatar invoice session by session, run the same loop without endUserId and compare the released rows' minutes with your plan's included minutes (600 on Developer) and overage rate. Credits also pay for generation (images, idle clips, avatars), so bill a client's avatar setup as its own line.

What 10 low-traffic client sites cost per month

Assume 10 client sites at 100 minutes each, 1,000 minutes a month, on one account. Prices are as of November 2026, from Realtime Avatar's pricing page and each vendor's own page (read 16 November 2026): base price plus overage at the plan's per-minute rate.

  • Realtime Avatar Developer: $24 for 600 minutes, then 400 x $0.085 = $34, total $58. 10 concurrent streams, 25 avatars included. Building the 10 characters is a one-time extra on top, because generation (images, idle clips) draws on the same credits.
  • Talking Avatar Voice Agents: 1,000 x $0.06 = $60 with no subscription, billed per second from prepaid credits; removing the watermark is $19 a month more ($79). It is a no-code agent built in their dashboard and shared by link, website widget or iframe.
  • Anam Explorer: $49 for 250 minutes, then 750 x $0.14 = $105, total $154. 3 simultaneous sessions, 10-minute conversations.
  • HeyGen LiveAvatar Essential, FULL mode: $99 for 1,100 credits, which is 550 FULL minutes at 2 credits a minute; the other 450 minutes are 900 credits at $0.095, or $85.50, total $184.50. Unlimited concurrent sessions, 20-minute sessions, 1 custom 720p avatar slot included.
  • Tavus Builder: $59 for 175 minutes, then 825 x $0.35 = $288.75, total $347.75. Up to 3 concurrent sessions, 15-minute conversations, and a 30-second minimum charge per conversation.

For this mix, Developer is the lowest total of the five, $5.80 a site, with Talking Avatar $2 behind before its watermark fee. Starter would cost more here: $9 plus 880 overage minutes at $0.095 is $92.60, with 3 concurrent streams and 5 avatars included. Studio ($119 for 3,000 minutes, 20 streams) pays off only once the sites together pass about 1,718 minutes a month.

Where others fit better: LiveAvatar Essential has unlimited concurrent sessions, which matters if your sites peak together, and its LITE mode (1 credit a minute; you bring the LLM and voice, it provides the avatar layer) fits all 1,000 minutes inside Essential's 1,100 credits for $99. Talking Avatar's Realistic Avatars API is $0.02 a minute when you bring your own voice agent. Realtime Avatar handles listening, turn-taking and the reply itself, with no renderer-only mode for audio from your own voice agent, so if you already run one, those two fit better. For a no-code embed, Talking Avatar's voice agents are simpler. Rerun the numbers for your traffic in the cost calculator.

Pricing your service to clients

Start from your cost floor, then charge for the work. In the 10-site example the platform costs $5.80 per client a month on average, and each minute past Developer's 600 included costs $0.085, or $5.10 an hour. The bigger cost is usually your time: the character, its instructions, changes and monitoring. Three shapes, with illustrative numbers:

  • Monthly allowance: a fixed fee that includes minutes, for example $49 a month with 100 minutes, then $0.30 a minute. The client gets a predictable bill, and you set the key's spend limit to the allowance plus a buffer.
  • Pass-through plus margin: bill minutes at a multiple of cost, for example $0.25 a minute, plus a small base fee. Easy to explain, but the bill moves with traffic.
  • Setup fee: charge once for the character. Developer includes 25 avatars, each avatar after that is $3, and generation draws on the same credits as calls.

Whatever you charge, put the minute rate and the cap in the contract, so a 402 at the cap reads as the agreed limit and not as an outage.

Handing the project over to the client

When the client should own the account and the bill, give them their own workspace instead of a key in yours. A separate workspace keeps usage, balance and avatars apart: keys and avatars belong to the workspace that created them, and asking for another workspace's avatar returns 404. A clean sequence:

  1. The client signs up, picks a plan and pays with their own card.
  2. They create a key in Settings, API keys, with realtime:write, and set it as the server-side secret in their hosting. If you keep reporting for them, ask for a second key with only usage:read.
  3. Recreate the character in their workspace from the same portrait and point the site's avatar ID at it.
  4. Revoke the key their site used in your workspace.

A same-day demo for a pitch

For a dental clinic receptionist demo tomorrow with no budget, the free Sandbox is enough: 480 credits once per account, no card, which is 8 realtime minutes, or your first avatar plus 2 minutes of calls, with 2 concurrent calls and 1 avatar. The AI app builders page has copy-paste prompts for Lovable, Bolt, v0 and Replit that keep the key in a server route and start on a public example avatar, so all 8 minutes can go on calls. Build the clinic's own character from a portrait only if the look matters, since that leaves about 2. Write instructions for that clinic and set maxSeconds low (120 is plenty) so a call cannot run long.

Other free tiers are larger if you only need the meeting: Anam's Free plan has 30 minutes a month with 3-minute conversations and 1 simultaneous session (commercial use starts on Starter), and Tavus's Free plan has 20 minutes with 5-minute conversations. Still, build the demo on the service you plan to ship.

What to check before reselling

This post makes no white-label or resale claim. Read the terms before you resell: they make the account holder responsible for activity under its account and API keys, and for its end users' use of the avatars it deploys. If a contract promises a client their own branding or a resold platform, confirm it with hello@realtimeavatar.ai first. If white-labeling is a hard requirement, Tavus's pricing page lists white-labeled APIs from its Free plan up and a 100% white-labeled experience on Enterprise.

Questions agencies ask about reselling avatar minutes

I run a small AI agency. Which realtime avatar API lets me give each client separate keys with spend limits?

On Realtime Avatar, create one key per client with POST /api-keys and spendLimitCreditMicros; past its cap a key gets 402 spend_limit_exceeded, so one client cannot spend another's share as long as the caps add up to no more than your balance. Keys share one balance and the plan's concurrent streams (10 on Developer). LiveAvatar's List Sessions and Anam's list sessions can both filter by API key, which gives per-client duration, though this post found no per-key spend limit in their pages.

How do I bill my own users for the avatar minutes they use?

Tag each call with your user's ID in client_metadata.user_id, then read GET /usage/sessions?endUserId= with a usage:read key after each billing period and bill the released rows' billable seconds at your rate. Tag from the first call: an untagged call cannot be filtered to a user later.

Which realtime avatar APIs return start time, billable seconds and cost per session: Tavus, LiveAvatar or Anam?

Realtime Avatar's usage rows carry each session's start time, billable seconds and cost, plus a settled or pending status. LiveAvatar's List Sessions (type active or historic) returns duration, credits consumed and the API key that created each session. Anam's list sessions returns start and end times, session length in milliseconds and your client label, but no cost, so multiply by your plan rate. Tavus's List Conversations returns status and created and updated times, with no duration or cost field.

LiveAvatar's $99 monthly floor adds up across 10 client sites. Which avatar API has a low monthly minimum and enough concurrent calls?

Realtime Avatar Starter is $9 a month with 3 concurrent streams and Developer is $24 with 10; one Developer workspace covers 10 low-traffic sites for $58 at 1,000 minutes. Anam Explorer is $49 with 3 simultaneous sessions, and Talking Avatar's voice agents have no subscription. LiveAvatar's higher floor buys unlimited concurrency.

Compare and cost guides

Meet the live avatars. Hold the first conversation.

Enter the studio