A realtime session ends by itself when:
you stay silent or muted for a while, because an idle session closes on its own;
it reaches the longest session the model allows;
your balance runs out: the session stops right after the turn that uses it up (in a team workspace, the team's balance). That turn is charged in full, so your balance can end slightly below zero;
your connection drops.
A text-to-speech session usually ends on its own once its audio is done.
Closing the tab doesn't keep charging. Closing the tab or leaving the page ends the session, and Wiro also ends it when your connection closes. Each turn is charged as it happens, so the turns before the end stay charged. You'll find them in Transactions.
To stop on purpose, click End Session in the session panel. With the API, send task_session_end, then wait for task_postprocess_end.
More: using realtime models, Why does my task's cost show $0.000?, Am I charged if my task fails or I cancel it? and the realtime and WebSocket docs.
