What is Backend Mode Integration?
Backend Mode Integration is a Standalone Integration centered on the Server SDK: your backend connects to Motion Server, sends avatar speech audio, receives encoded audio payloads and motion data payloads, then delivers those payloads to AvatarKit clients. Use this path when your backend owns ASR, LLM, TTS, turn-taking, provider keys, and the connection to Motion Server.At a glance
Core backend flow
The Server SDK is the required piece in this path. The client does not connect to Motion Server directly, and it usually does not hold a Spatius Session Token. Instead, the client receives encoded audio payloads and motion data payloads from your backend and feeds them into AvatarKit withyieldAudioData() and yieldFramesData().
Do not confuse a Backend Mode server with a Direct Mode token endpoint. A Direct Mode token endpoint only mints short-lived Session Tokens. A Backend Mode server is part of the runtime: it owns the audio pipeline, connects to Motion Server with the Server SDK, and transports encoded audio payloads + motion data payloads to clients.
SDK roles
Requirements
Transport options
Transport is a second decision inside Backend Mode Integration. LiveKit is optional.Backend Mode does not require LiveKit or Agora. The required integration point is the Server SDK on your backend. RTC providers are downstream transport options after your backend receives data from Motion Server.
Architecture variants
Your own transport
Your backend receives encoded audio payloads and motion data payloads from the Server SDK and relays them to clients over your own WebSocket or network layer.
Third-party realtime transport
Your backend still uses the Server SDK. The RTC provider only carries the downstream audio payloads and motion data payloads between your backend and your clients.
Next steps
Server SDK role
Backend SDK responsibility and language references.
Client SDK role
Client-side rendering responsibility.
Browse all demos
Run reference implementations for Web, iOS, Android, and Flutter.
Your own transport
Direct WebSocket relay between your backend and clients.

