Upgrade to a WebSocket connection for an interactive PTY session.
X-PTY-Token: <token>?token=<token>READY frame immediately so Tensorlake can flush any buffered output.
| Opcode | Meaning | Payload |
|---|---|---|
0x00 | Data | Raw terminal input bytes |
0x01 | Resize | cols as big-endian u16, then rows as big-endian u16 |
0x02 | Ready | No payload |
| Opcode | Meaning | Payload |
|---|---|---|
0x00 | Data | Raw terminal output bytes |
0x03 | Exit | Exit code as big-endian i32 |
403 Forbidden with code INVALID_TOKEN.404 Not Found with code SESSION_NOT_FOUND.0x03 exit frame and then closes the WebSocket with reason exit:<code>.1001 and reason session terminated.READY, Tensorlake buffers output up to 1 MB before disconnecting the client.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Preferred PTY session token header for WebSocket authentication.
The PTY session identifier.
Optional PTY token. Prefer the X-PTY-Token header instead of the query string.
WebSocket upgrade successful