WebSocket & SSE
Streaming endpoints — PTY, LSP, logs, events.
The hosted API origin is https://api.pandastack.ai; WebSocket clients should use the matching wss://api.pandastack.ai scheme. Authenticate with JWT or Authorization: Bearer $PANDASTACK_API_KEY where the route allows token auth.
Server-Sent Events
POST /v1/sandboxes/{id}/exec/stream
GET /v1/sandboxes/{id}/eventsexec/stream streams command output. events streams sandbox lifecycle and agent events.
Logs
GET /v1/sandboxes/{id}/logs?stream=both&follow=trueThe SDK exposes this as sandbox.logs(stream="both", follow=False) in Python and sandbox.logs("both", false) in TypeScript.
WebSocket endpoints
GET /v1/sandboxes/{id}/exec/pty
GET /v1/sandboxes/{id}/exec/ws
GET /v1/sandboxes/{id}/lsp/{lang}/exec/ptyopens an interactive terminal./exec/wsruns command execution over WebSocket./lsp/{lang}proxies a language server session forlang.
CLI equivalents
pandastack sandbox ssh <id>
pandastack sandbox exec <id> -- python -c 'print(42)'
pandastack sandbox logs <id> --stream both