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

# API Reference

> Create, manage, and terminate avatar sessions from your backend.

The Avaturn.Live API manages session lifecycle. Create a session with a [conversation engine](/howtos/openai_realtime_api) config; receive a `session_id` (backend handle) and a `token` (frontend credential).

## Authentication

All endpoints require an `Authorization: Bearer <API_KEY>` header. API keys are issued in the [dashboard](https://avaturn.live/dashboard).

<Warning>
  API keys must stay on the backend. Anyone with the key can act on your behalf — rotate immediately in the dashboard if compromised.
</Warning>

## Base URL

```
https://api.avaturn.live
```

## Errors

Endpoint-specific error codes are listed in each operation's reference page. Common patterns:

* `400 Bad Request` — invalid payload (e.g. unknown `voice_id`, invalid `render_model` for the chosen avatar).
* `401 Unauthorized` — missing or revoked API key.
* `410 Gone` — `avatar_id` no longer exists.
* `422 Unprocessable Content` — missing required engine field (e.g. `client_secret` for `openai-realtime`).
