Documentation Index
Fetch the complete documentation index at: https://docs.spatius.ai/llms.txt
Use this file to discover all available pages before exploring further.
What is Backend Mode with your own transport?
This is the Backend Mode Integration shape where your application owns the network connection between AvatarKit’s server-side SDK and the client. Your server sends encoded messages to your client, and the client SDK receives and decodes them internally for synchronized playback and rendering. SDK Reference pages cover the exact enum and method names for each platform.When to use
- Custom network layer — you manage the connection between your client and AvatarKit’s server SDK yourself.
- Third-party realtime transport — messages are relayed through a provider such as LiveKit. (See Backend Mode with LiveKit for that variant.)
- Proxy architecture — your backend acts as a relay between the client and Motion Server.
Requirements
| Requirement | Description |
|---|---|
| App ID | Obtained from Spatius Studio. |
| Session Token | Not required on the client side. |
| Spatius Server SDK | Your backend must integrate with the Spatius Server SDK to generate messages. |
Direct Mode vs Backend Mode (own transport)
| Aspect | Direct Mode | Backend Mode (own transport) |
|---|---|---|
| Network | Client SDK connects to Motion Server directly. | Your app relays messages from the Spatius Server SDK. |
| Message decoding | Handled internally. | Handled internally (same). |
| Session Token | Required (client-side). | Not required (client-side). |
| Spatius Server SDK | Not needed. | Required on your backend. |
| Key methods | send(), start(), close() | yieldAudioData(), yieldFramesData() |
Key Concepts
ConversationId Management
ConversationId links audio and encoded motion messages for a single conversation session:- Call
yieldAudioData()— returns aconversationId. - Use that
conversationIdwhen callingyieldFramesData(). - Messages with a mismatched conversationId will be discarded.
Fallback Mechanism
If you provide empty motion data (empty array or undefined), the SDK automatically enters audio-only mode for that session. Once in audio-only mode, any subsequent motion data for that session is ignored — only audio continues playing.Next steps
Browse all demos
Run the Backend Mode reference implementations for Web, iOS, Android, and Flutter.
Backend Mode with LiveKit
Reuse a LiveKit room as the downstream transport instead of your own WebSocket.