Base URL & Authentication
All API requests go through the control plane:
The control plane handles sandbox lifecycle (create, list, kill, hibernate, wake) and transparently proxies data-plane requests (exec, files, agents, PTY) to the worker that owns the sandbox.
SDK users only need the API key.
WebSocket Binary Protocol
Exec and PTY WebSocket sessions use binary frames with a 1-byte stream prefix:
Connection flow:
- Client opens WebSocket with
?api_key=<key> - Server replays scrollback buffer (historical output)
- Server sends
0x04to mark end of scrollback - Live output streams as
0x01/0x02frames - When the process exits, server sends
0x03with the exit code - Server closes the connection
0x00 and send as a binary frame.
PTY sessions use the same binary framing but without stream prefixes — raw bidirectional terminal data.