> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talking-avatar.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> The realtime avatar API, the REST API, and the requests we send you.

Talking Avatar has two APIs, both authenticated with your [API key](https://docs.talking-avatar.dev/dashboard/api-keys.md) and used from your server.

> **[Realtime avatar API (WebSocket)](https://docs.talking-avatar.dev/api-reference/realtime/overview.md)**
>
> Run Realistic Avatars from any language: start a session, stream your agent's voice, interrupt, and show the avatar in browsers or your LiveKit room.

> **[REST API](#rest-api)**
>
> Manage a private voice agent's links.

On Node.js, the [SDK](https://docs.talking-avatar.dev/sdk/installation.md) wraps both. This tab also documents the requests **we send to you**: [tool calls](https://docs.talking-avatar.dev/api-reference/tool-call-request.md) and the [post-call webhook](https://docs.talking-avatar.dev/api-reference/call-ended-event.md), and how to [verify their signatures](https://docs.talking-avatar.dev/api-reference/verify-signatures.md).

## Realtime avatar API

```text theme={null}
wss://api.talking-avatar.dev
```

One WebSocket connection per avatar session. Your API key goes in the first message. See [Realtime avatar API](https://docs.talking-avatar.dev/api-reference/realtime/overview.md).

## REST API

### Base URL

```text theme={null}
https://backend.talking-avatar.dev/api/talking-avatar
```

### Authentication

Send your API key as a bearer token:

```bash theme={null}
curl https://backend.talking-avatar.dev/api/talking-avatar/voice-agents/AGENT_ID/links \
  -H "Authorization: Bearer $TALKING_AVATAR_API_KEY"
```

Keys are per account. A key can only reach its own account's agents.

### Requests and responses

Send JSON bodies with `Content-Type: application/json`. Successful responses wrap the result in `data`:

```json theme={null}
{
  "data": { "id": "…" },
  "code": 201,
  "message": "Link created"
}
```

Errors return the HTTP status in `code`, and a readable `message`:

```json theme={null}
{ "code": 401, "message": "Invalid API key" }
```

### Status codes

| Status | Meaning |
| - | - |
| `200`, `201` | Success |
| `400` | The request is invalid, for example an `expiresAt` in the past or more than a year away |
| `401` | The API key is missing, invalid or revoked |
| `404` | The agent or link doesn't exist, or belongs to another account |
| `5xx` | Something went wrong on our side. Retry with backoff. |

### Endpoints

| Method | Path | Description |
| - | - | - |
| `POST` | `/voice-agents/{agentId}/links` | [Create a link](https://docs.talking-avatar.dev/api-reference/agent-links/create.md) |
| `GET` | `/voice-agents/{agentId}/links` | [List links](https://docs.talking-avatar.dev/api-reference/agent-links/list.md) |
| `DELETE` | `/voice-agents/{agentId}/links/{linkId}` | [Delete a link](https://docs.talking-avatar.dev/api-reference/agent-links/delete.md) |

> [!TIP]
>
> On Node.js, the SDK's [`createAgentLink`, `listAgentLinks` and `deleteAgentLink`](https://docs.talking-avatar.dev/sdk/agent-links) wrap these endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.