Skip to main content
This endpoint upgrades an HTTP connection to a WebSocket so you can stream command output as it is produced. Unlike the blocking exec endpoint, output arrives event by event — useful for long-running processes, build jobs, or any command where you want to display progress in real time.

Endpoint

Upgrade this request to a WebSocket by including the standard Upgrade: websocket headers.

Authentication

string
required
Your team’s API key. Pass the full wrn_... key value.

Path parameters

string
required
The capsule ID.

WebSocket protocol

Once the connection upgrades (HTTP 101), you control the session with JSON messages.

Client messages

Start a process — send this as the first message after connecting:
Stop the process — send this to terminate the running process early:

Server messages

The server emits JSON messages as the process produces output:
The connection closes automatically once the server sends an exit message. You do not need to close it manually.

Python SDK

The SDK wraps the WebSocket protocol and yields events as an iterator:

Errors