Integration boundary
What connects to what
The public Direct Mode Web quickstart sends browser microphone input to OpenAI Realtime, normalizes assistant PCM, and gives the generated speech to AvatarKit.
Prerequisites
- Node.js 18+
- A Spatius App ID, Avatar ID, and short-lived Session Token
- OpenAI Realtime access only for the optional conversation step
- A backend token exchange for production
Implementation path
Build a testable baseline
- 1
Clone the official Spatius avatar demo and open the Web Direct Mode quickstart.
- 2
Install dependencies and configure only the three Spatius values first.
- 3
Connect the avatar and send the bundled PCM sample to validate loading, Motion Server connectivity, lip sync, and local rendering.
- 4
Add the OpenAI Realtime adapter and microphone path after the sample-audio baseline passes.
- 5
Move long-lived provider credentials behind a backend or short-lived token flow before production.
Decision guidance
Best for and not best for
Best for
- Browser voice agents already evaluating OpenAI Realtime
- Teams that want to own the UI and conversation stack
Not best for
- Teams buying an end-to-end managed avatar-video service
- Native mobile projects using this Web-specific quickstart
Evidence-aware assessment
Advantages and limitations
Advantages
- Separates avatar validation from provider validation
- Keeps finished avatar rendering on the client
- Provides a concrete failure-isolation sequence
Limitations
- The realtime provider path is optional and requires separate provider access
- Long-lived provider keys must not ship in browser code
- No first-party latency benchmark for this exact combined stack is available in the supplied evidence
A long-lived provider key in browser code is demonstration-only. Production needs a backend or ephemeral credential flow plus explicit cancellation and interruption handling. Indexing this guide does not convert an architecture blueprint into a claimed native connector; run and document the validation checklist before production use.
Page-specific FAQ
Implementation questions
Does Spatius replace OpenAI Realtime?
No. OpenAI Realtime supplies conversation audio; Spatius turns synthesized audio into motion and renders the avatar locally.
Can I expose an OpenAI API key in the browser?
No. The official Spatius quickstart describes the realtime path as local development and recommends short-lived tokens or a backend proxy for production.
What should I test first?
Use the bundled PCM sample. If that passes, provider failures can be investigated without confusing them with AvatarKit setup errors.
Primary evidence
Sources and verification
Reviewed 2026-08-10. Recheck versions and implementation details before publication.
Continue exploring