Sessions

Force-terminates a running session. The engine hosting the session disconnects the client and shuts the session down immediately.

Termination is asynchronous on the engine side: the session's endTime, exit status and session report are delivered through the normal end-of-session flow shortly after the stop, so the session may briefly still appear active on GET /v1/sessions/{id}.

Stopping a session that has already ended returns 200 without contacting the engine, so repeating a stop is safe. That includes a session whose end reaches Lab while the stop is in flight.

Running sessions that never reached an engine, or that run over the LiveKit or Agora integrations, have no engine host to terminate and return 404. If the engine does not confirm the stop of a running session, the request fails with 502.

post/v1/sessions/{id}/stop

Request

  • Base URL
    https://api.anam.ai
  • URL
    https://api.anam.ai/v1/sessions/{id}/stop
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

Session ID

Response

The engine accepted the stop request, or the session had already ended

object required

Changes