Implement the client
1
Initialize AvatarKit in Backend Mode
Use the same App ID, Avatar ID, region, and audio format as the backend session. Backend Mode does not use a Spatius Session Token on the client.
2
Connect to your backend
Use your application’s WebSocket or streaming transport. For every response, deliver the audio before its first motion data payload, and include the same turn ID on both message types.
3
Feed audio and motion data
Pass each audio payload to the platform’s audio-yield method. Store the conversation ID it returns against your backend turn ID, then use that conversation ID when you pass the matching motion data to AvatarKit.
Web example
Web example
4
Clean up
Interrupt discarded turns, close your application transport, and dispose of the Avatar view when the experience ends. Do not call the Direct Mode
start() or send() methods on this path.
