Sign Up

Process

Execute code

POST
/process/code-run

Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts

Request Body

Code execution request

application/json
  1. body
argv?array<string>
code*string
envs?
language*string

python, javascript, typescript

timeout?integer

Response Body

OK

application/json
  1. response
artifacts?
exitCode?integer
result?string
curl -X POST 'https://example.com/process/code-run' \  -H 'Content-Type: application/json' \  -d '{  "code": "string",  "language": "string"}'
{  "artifacts": {    "charts": [      {        "elements": [          {            "angle": 0,            "first_quartile": 0,            "group": "string",            "label": "string",            "max": 0,            "median": 0,            "min": 0,            "outliers": [              0            ],            "png": "string",            "points": [              [                0              ]            ],            "radius": 0,            "third_quartile": 0,            "title": "string",            "type": "string",            "value": "string",            "x_label": "string",            "y_label": "string"          }        ],        "png": "string",        "title": "string",        "type": "string",        "x_label": "string",        "x_scale": "string",        "x_tick_labels": [          "string"        ],        "x_ticks": [          0        ],        "y_label": "string",        "y_scale": "string",        "y_tick_labels": [          "string"        ],        "y_ticks": [          0        ]      }    ]  },  "exitCode": 0,  "result": "string"}

Execute a command

POST
/process/execute

Execute a shell command and return the output and exit code

Request Body

Command execution request

application/json
  1. body
command*string
cwd?string

Current working directory

envs?

Environment variables to set for the command

timeout?integer

Timeout in seconds, defaults to 10 seconds

Response Body

OK

application/json
  1. response
exitCode?integer
result*string
curl -X POST 'https://example.com/process/execute' \  -H 'Content-Type: application/json' \  -d '{  "command": "string"}'
{  "exitCode": 0,  "result": "string"}

List all PTY sessions

GET
/process/pty

Get a list of all active pseudo-terminal sessions

Response Body

OK

application/json
  1. response
sessions*array<>
curl -X GET 'https://example.com/process/pty'
{  "sessions": [    {      "active": true,      "cols": 0,      "createdAt": "string",      "cwd": "string",      "envs": {        "property1": "string",        "property2": "string"      },      "id": "string",      "lazyStart": true,      "rows": 0    }  ]}

Create a new PTY session

POST
/process/pty

Create a new pseudo-terminal session with specified configuration

Request Body

PTY session creation request

application/json
  1. body
cols?integer
cwd?string
envs?
id?string
lazyStart?boolean

Don't start PTY until first client connects

rows?integer

Response Body

Created

application/json
  1. response
sessionId*string
curl -X POST 'https://example.com/process/pty' \  -H 'Content-Type: application/json' \  -d '{}'
{  "sessionId": "string"}
GET
/process/pty/{sessionId}

Get detailed information about a specific pseudo-terminal session

Path Parameters

sessionId*string

PTY session ID

Response Body

OK

application/json
  1. response
active*boolean
cols*integer
createdAt*string
cwd*string
envs*
id*string
lazyStart*boolean

Whether this session uses lazy start

rows*integer
curl -X GET 'https://example.com/process/pty/string'
{  "active": true,  "cols": 0,  "createdAt": "string",  "cwd": "string",  "envs": {    "property1": "string",    "property2": "string"  },  "id": "string",  "lazyStart": true,  "rows": 0}

Delete a PTY session

DELETE
/process/pty/{sessionId}

Delete a pseudo-terminal session and terminate its process

Path Parameters

sessionId*string

PTY session ID

Response Body

OK

application/json
  1. response
[key: string]?unknown
curl -X DELETE 'https://example.com/process/pty/string'
{  "property1": null,  "property2": null}
GET
/process/pty/{sessionId}/connect

Establish a WebSocket connection to interact with a pseudo-terminal session

Path Parameters

sessionId*string

PTY session ID

Response Body

Switching Protocols - WebSocket connection established

curl -X GET 'https://example.com/process/pty/string/connect'
Empty

Resize a PTY session

POST
/process/pty/{sessionId}/resize

Resize the terminal dimensions of a pseudo-terminal session

Path Parameters

sessionId*string

PTY session ID

Request Body

Resize request with new dimensions

application/json
  1. body
cols*integer
Range1 <= value <= 1000
rows*integer
Range1 <= value <= 1000

Response Body

OK

application/json
  1. response
active*boolean
cols*integer
createdAt*string
cwd*string
envs*
id*string
lazyStart*boolean

Whether this session uses lazy start

rows*integer
curl -X POST 'https://example.com/process/pty/string/resize' \  -H 'Content-Type: application/json' \  -d '{  "cols": 1,  "rows": 1}'
{  "active": true,  "cols": 0,  "createdAt": "string",  "cwd": "string",  "envs": {    "property1": "string",    "property2": "string"  },  "id": "string",  "lazyStart": true,  "rows": 0}

List all sessions

GET
/process/session

Get a list of all active shell sessions

Response Body

OK

application/json
  1. response
[index: integer]?
curl -X GET 'https://example.com/process/session'
[  {    "commands": [      {        "command": "string",        "exitCode": 0,        "id": "string"      }    ],    "sessionId": "string"  }]

Create a new session

POST
/process/session

Create a new shell session for command execution

Request Body

Session creation request

application/json
  1. body
sessionId*string

Response Body

Created

curl -X POST 'https://example.com/process/session' \  -H 'Content-Type: application/json' \  -d '{  "sessionId": "string"}'
Empty
GET
/process/session/entrypoint

Get details of an entrypoint session including its commands

Response Body

OK

application/json
  1. response
commands*array<>
sessionId*string
curl -X GET 'https://example.com/process/session/entrypoint'
{  "commands": [    {      "command": "string",      "exitCode": 0,      "id": "string"    }  ],  "sessionId": "string"}

Get entrypoint logs

GET
/process/session/entrypoint/logs

Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming.

Query Parameters

follow?boolean

Follow logs in real-time (WebSocket only)

Response Body

Entrypoint log content

  1. response
output*string
stderr*string
stdout*string
curl -X GET 'https://example.com/process/session/entrypoint/logs'
{  "output": "string",  "stderr": "string",  "stdout": "string"}

Get session details

GET
/process/session/{sessionId}

Get details of a specific session including its commands

Path Parameters

sessionId*string

Session ID

Response Body

OK

application/json
  1. response
commands*array<>
sessionId*string
curl -X GET 'https://example.com/process/session/string'
{  "commands": [    {      "command": "string",      "exitCode": 0,      "id": "string"    }  ],  "sessionId": "string"}

Delete a session

DELETE
/process/session/{sessionId}

Delete an existing shell session

Path Parameters

sessionId*string

Session ID

Response Body

No Content

curl -X DELETE 'https://example.com/process/session/string'
Empty
GET
/process/session/{sessionId}/command/{commandId}

Get details of a specific command within a session

Path Parameters

sessionId*string

Session ID

commandId*string

Command ID

Response Body

OK

application/json
  1. response
command*string
exitCode?integer
id*string
curl -X GET 'https://example.com/process/session/string/command/string'
{  "command": "string",  "exitCode": 0,  "id": "string"}

Send input to command

POST
/process/session/{sessionId}/command/{commandId}/input

Send input data to a running command in a session for interactive execution

Path Parameters

sessionId*string

Session ID

commandId*string

Command ID

Request Body

Input send request

application/json
  1. body
data*string

Response Body

No Content

curl -X POST 'https://example.com/process/session/string/command/string/input' \  -H 'Content-Type: application/json' \  -d '{  "data": "string"}'
Empty

Get session command logs

GET
/process/session/{sessionId}/command/{commandId}/logs

Get logs for a specific command within a session. Returns JSON with separated stdout/stderr for SDK >= 0.167.0, plain text otherwise. Supports WebSocket streaming.

Path Parameters

sessionId*string

Session ID

commandId*string

Command ID

Query Parameters

follow?boolean

Follow logs in real-time (WebSocket only)

Response Body

Log content (JSON for new SDKs, plain text for old SDKs)

  1. response
output*string
stderr*string
stdout*string
curl -X GET 'https://example.com/process/session/string/command/string/logs'
{  "output": "string",  "stderr": "string",  "stdout": "string"}
POST
/process/session/{sessionId}/exec

Execute a command within an existing shell session

Path Parameters

sessionId*string

Session ID

Request Body

Command execution request

application/json
  1. body
async?boolean
command*string
runAsync?boolean
suppressInputEcho?boolean

Response Body

OK

application/json
  1. response
cmdId*string
exitCode?integer
output?string
stderr?string
stdout?string
curl -X POST 'https://example.com/process/session/string/exec' \  -H 'Content-Type: application/json' \  -d '{  "command": "string"}'
{  "cmdId": "string",  "exitCode": 0,  "output": "string",  "stderr": "string",  "stdout": "string"}