Prepare RTC tokens
Generate Agora RTC tokens on your backend with the App Certificate. Use a distinct UID and token for each participant:
Use distinct Agora UIDs for the user, the Convo AI agent, and the Spatius avatar publisher. Do not reuse the avatar publisher UID as a client UID.
Spatius avatar provider
Get the App ID and API Key from Apps (Developer → API Key) and the Avatar ID from the Avatar Library. Keep the API Key in the server-side agent configuration.
Add properties.avatar to the Convo AI agent configuration:
Replace the ${SPATIUS_*} placeholders in your server code before submitting the request. The publisher token must match agora_uid and properties.channel; sample_rate must match the agent’s TTS output. See Regions and Audio for the optional region and audio settings.
After the start-agent request succeeds, return the Spatius App ID, Avatar ID, Agora App ID, channel, client UID, and client RTC token to your app. Never return the Spatius API Key or Agora App Certificate.
Next steps