Skip to main content
A private voice agent takes calls only through its links. These functions make, list and delete them with your API key. They need Node.js 18 or later. The same operations are available over REST. Makes a new link. Returns Promise<AgentLink>.
string
required
Your tav_… API key.
string
required
The voice agent’s ID: the last part of the editor’s URL (/voice-agents/<id>). The Share & embed tab’s examples include it.
string
Who or what it’s for, shown in the dashboard. Up to 120 characters.
Date | string
default:"in 24 hours"
When it stops working. At most a year away.
number
How many calls it may start, from 1 to 100,000 (1 for a one-time link). Default: any number until it expires.
string
The API’s base URL. Leave it out.
The agent’s links, newest first, expired and used-up ones included (up to 200). Returns Promise<AgentLink[]>.
Takes apiKey, agentId and the optional apiUrl. Deletes a link: it stops working right away. A call already on it carries on. Returns Promise<void>.
Takes apiKey, agentId, linkId and the optional apiUrl.
string
The link’s ID
string | null
Who or what it’s for
string
The page to send: the agent’s call page with the link’s token. Add &embed=1 to put it in an iframe.
string
The link’s secret, for the widget’s data-token
string
When it stops working (ISO 8601)
number | null
How many calls it may start; null for any number until it expires
number
How many calls it has started
string
When it was made (ISO 8601)

TalkingAvatarApiError

Thrown when a request fails. Extends Error.