Skip to content

Connect to PTY session (WebSocket)

GET
/v1/sandbox/{sandboxID}/pty/{sessionID}/connect

Upgrade to a WebSocket connection for interactive terminal I/O. Send terminal input as binary WebSocket messages. Receive terminal output as binary WebSocket messages. The connection stays alive until closed by either side or the sandbox is deleted.

sandboxID
required
string

Unique sandbox identifier.

sessionID
required
string

Unique session identifier.

WebSocket connection established.

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string

Resource not found.

object
message
required

Human-readable error message.

string