Skip to main content
Run the REST API from your backend. Avaturn API keys exposed in the browser can be stolen and used to act on your behalf.

Session lifecycle

1

Create a session

POST /api/v1/sessions with a conversation engine config. Response contains session_id (backend) and token (frontend).
2

Hand the token to the frontend

The token is the only credential the browser needs. The Web SDK uses it to join the avatar room over WebRTC.
3

Terminate the session

DELETE /api/v1/sessions/{id} when you’re done, or rely on auto-termination (user_absent_timeout / max_duration).
A working end-to-end snippet lives in Example. For backend-driven scripted speech (no STT), see Legacy text-echo.