Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
Skip to Content
API ReferenceComputeSandboxes

Open an interactive terminal in a sandbox

Opens an interactive terminal over a WebSocket. Binary frames carry stdin and output; text frames carry resize controls and the exit code. Uses the HTTP/1.1 upgrade; HTTP/2 extended CONNECT (RFC 8441) is not offered. Send {"resize":{"cols":120,"rows":40}} to resize; the last frame received is {"exit":0}.

Required permission

Requires the sandboxes.exec permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

Guided workflow: orl sandbox pty

orl sandbox pty <sandbox-id>
GET
/v1/sandboxes/{sandboxId}/pty

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

sandboxId*string

Query Parameters

cmd?string

The command to run. Defaults to /bin/sh.

cols?integer
Range1 <= value
Default80
rows?integer
Range1 <= value
Default24

Response Body

Switching to the WebSocket protocol

Example Request
curl -X GET 'https://api.openrelay.inc/v1/sandboxes/string/pty'
Example Response
Empty