<!-- AvatarFactory Docs · https://avatarfactory.in/docs/guides/limits · Full map: https://avatarfactory.in/llms.txt -->

# Limits & Quotas

Every timeout and its default, the context cap, audio-format requirements, rate limits, and the browser/device support matrix — in one place.

The limits that affect a running session, collected so you don't have to hunt
for them across pages.

## Timeouts

| Timeout | Default | What happens |
| --- | --- | --- |
| Idle session timeout | ~2 min | A session with no interaction ends automatically. Keep it active or reconnect to persist. |
| Error lifetime | Until next start() | The error state is sticky — it never clears on a timer, so a dead-end screen rendered off error.fatal stays put until you reconnect. |
| Session token expiry | ~8 s | Tokens are single-use and very short-lived; the SDK requests a fresh one via getSessionToken on each connect. |
| Connection setup | 5–7 s first / 2–3 s cached | First connect downloads and initializes the Rive avatar; later connects load it from cache. |

> **Runaway usage:** metering accrues while the **avatar is speaking**, so a loop
>   that makes the avatar talk repeatedly burns usage fast — guard against it.
>   Separately, every open session counts against your concurrency limit (5 open
>   connections), so end sessions you no longer need.

## Input caps

Exceeding any of these emits a **non-fatal** `INVALID_INPUT`. The call is
dropped; the session is untouched.

| Input | Cap | Notes |
| --- | --- | --- |
| addLiveContext() context | 2,000 chars | Per call. Summarize or chunk before sending. |
| speakText() text | 5,000 chars | Per call, in tts mode. |
| speakAudio() audio | 15 MB | Per call, in audio mode. |
| Greeting message | 400 chars | Clamped to match the server, so a longer message is truncated rather than rejected. |

## Built-in feature limits

Defaults inside the SDK, most of them adjustable in config.

| Limit | Value | What it governs |
| --- | --- | --- |
| Transcript entries retained | 50 | Configurable via transcript.maxEntries. Older lines fall off the front. |
| Connect tone ceiling | 15 s | Hard cap regardless of loop, so a wedged connect cannot leave the ringback droning. |
| Greeting lead-in | 500 ms | The beat after the session goes live before the avatar speaks, so the ringback's fade can finish. |
| Push-to-talk pre-roll | 200 ms | Already-captured audio released on press — people start talking just before their thumb lands. |
| Push-to-talk release tail | 250 ms | Real audio still sent after release, so the last syllable is not cut. |
| Push-to-talk max hold | 2 min | A hold this long is a stuck key, not a person. The turn is closed. |
| Camera frame buffer | 12 s | Rolling window, in memory only. Older frames are discarded on every capture. |
| Camera frames per look | 3 | Newest last, at 3 fps — roughly the last second. |

## Audio format (audio mode)

`audio` mode lip-syncs to audio you supply from another provider. Send **PCM**
audio in the exact format below; other formats or sample rates won't drive the
animation correctly. See [Modes](/docs/sdk/react/modes) for the per-mode contract.

| Requirement | Value |
| --- | --- |
| Format | 16-bit signed PCM, little-endian (PCM_S16LE) |
| Sample rate | 16000 Hz |
| Channels | Mono (1) |

## Rate limits

| Surface | Limit |
| --- | --- |
| Session token endpoint | 120 requests / min per API key |
| Concurrent sessions | 5 open connections (per IP) |

All plans currently allow **5 concurrent sessions** (5 open WebSocket
connections). Manage your account in the [Platform](/docs/platform/avatars).

## Browser & device support

| Platform | Status |
| --- | --- |
| Chrome / Edge (desktop) | Supported |
| Safari (desktop) | Supported — audio must be unlocked by a user gesture |
| Firefox (desktop) | Not yet tested |
| iOS Safari | Supported — autoplay requires a user gesture; see FAQ |
| Android Chrome | Supported |
| React Native (Expo) | Supported via a dev build (not Expo Go) |

> Building for mobile? The React Native SDK has its own permissions and echo
>   guidance — start at the [React Native Overview](/docs/sdk/react-native/overview).
