What is a session?
When you connect to a model, Reactor creates a session on a GPU running that model. The session holds all of the state for your interaction: the model’s current generation context, any prompts you have sent, and the media streams flowing between the model and your app. A session is independent of the network connection. If your connection drops, the session keeps running on the GPU. You can reconnect and pick up where you left off without losing any model state.Connection lifecycle
Every connection goes through four states:| State | Meaning |
|---|---|
disconnected | No active connection |
connecting | Negotiating with Reactor to create a session |
waiting | Session created, waiting for a GPU to be assigned |
ready | Connected to the GPU. You can send commands and receive media |
waiting state is normal – Reactor has accepted your request and is assigning a GPU,
which typically takes a few seconds. Once the status reaches ready, the WebRTC
connection to the GPU is established and media starts flowing.
Disconnecting
When you disconnect, you can choose whether to keep the session alive: Non-recoverable disconnect (default): the session is terminated and all state is released. Use this when the user is done with the session. Recoverable disconnect: the session stays alive on the GPU. You can reconnect later and the model resumes exactly where it left off. Use this to survive network interruptions or let users resume later.You are billed for the full duration of a session, from connection until termination.