Skip to main content

Start session

POST /session/start
Starts a new sandbox session or returns the active one if already running.

Session status

GET /session/status
Returns:
  • active session metadata
  • websocket URL for runtime chat
  • gateway token
  • health/runtime metadata (including runtime version probes when available)

Stop session

POST /session/stop
Stops the active session and releases runtime resources.

Restart runtime gateway

POST /session/restart-gateway
Forces runtime gateway restart inside the active sandbox.

Inject runtime config

POST /session/inject
Used to patch runtime config without full session recreation. Supported use cases include:
  • MCP server injection
  • Channel config updates
  • Model selection updates
  • BYOK/auth profile updates

Heartbeat and liveness

POST /session/heartbeat
Marks session activity and websocket liveness; used to avoid stale session states.

Notes

  • Session creation and updates are serialized to avoid duplicate active sessions
  • Stale sessions can be auto-retired when liveness checks fail
  • Realtime websocket URLs are issued through cloud API proxy, not direct sandbox exposure