The four credentials
Which credentials does each path need?
Session Token is only needed in Direct Mode (
DrivingServiceMode.direct), where AvatarController.start() opens a Motion Server WebSocket authenticated with the token. RTC / Platform Integration / Backend Mode paths use DrivingServiceMode.backend; the client does not open that WebSocket, and AvatarManager.load() fetches avatar metadata over an App-ID-scoped public endpoint that does not require a Session Token.Getting the values
- Create an app in Spatius Studio — you get the App ID and can generate an API Key.
- Pick or finetune an avatar in the Avatar Library — copy its Avatar ID.
- For Direct Mode: implement a backend endpoint that calls
POST /v1/console/session-tokenson the Console API to mint Session Tokens for clients on demand. See Session token API.
Region
Spatius currently operates inus-west, ap-northeast, and cn-beijing. Backends and SDKs default to us-west; set SPATIUS_REGION when your app should use another supported region. The SPATIUS_CONSOLE_ENDPOINT and SPATIUS_INGRESS_ENDPOINT override env vars exist for staging and proxy setups; you do not need them for normal use.
Security checklist
- API Key stays on the backend. If it leaks, rotate immediately in Spatius Studio.
- Session Tokens are designed to be single-use and short-lived. Issue a fresh token per client session.
- App ID and Avatar ID are not secrets, but treat them as configuration: change them via env vars or config files rather than hardcoding.
Next steps
Choose your integration path
Platform Integrations, Direct Mode, or Backend Mode.
Session token API
The exact
POST /v1/console/session-tokens call for your backend.
