Sign Up

Process

POST/process/code-run

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

Request Body

application/json

Code execution request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

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"}
POST/process/execute

Execute a shell command and return the output and exit code

Request Body

application/json

Command execution request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

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

Get a list of all active pseudo-terminal sessions

Response Body

application/json

application/json

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    }  ]}
POST/process/pty

Create a new pseudo-terminal session with specified configuration

Request Body

application/json

PTY session creation request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

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

application/json

application/json

application/json

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/process/pty/{sessionId}

Delete a pseudo-terminal session and terminate its process

Path Parameters

sessionId*string

PTY session ID

Response Body

application/json

application/json

application/json

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

*/*

curl -X GET "https://example.com/process/pty/string/connect"
Empty
POST/process/pty/{sessionId}/resize

Resize the terminal dimensions of a pseudo-terminal session

Path Parameters

sessionId*string

PTY session ID

Request Body

application/json

Resize request with new dimensions

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

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}
GET/process/session

Get a list of all active shell sessions

Response Body

application/json

application/json

curl -X GET "https://example.com/process/session"
[  {    "commands": [      {        "command": "string",        "exitCode": 0,        "id": "string"      }    ],    "sessionId": "string"  }]
POST/process/session

Create a new shell session for command execution

Request Body

application/json

Session creation request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

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

application/json

application/json

application/json

curl -X GET "https://example.com/process/session/entrypoint"
{  "commands": [    {      "command": "string",      "exitCode": 0,      "id": "string"    }  ],  "sessionId": "string"}
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

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

Get details of a specific session including its commands

Path Parameters

sessionId*string

Session ID

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/process/session/string"
{  "commands": [    {      "command": "string",      "exitCode": 0,      "id": "string"    }  ],  "sessionId": "string"}
DELETE/process/session/{sessionId}

Delete an existing shell session

Path Parameters

sessionId*string

Session ID

Response Body

*/*

*/*

*/*

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

application/json

application/json

application/json

curl -X GET "https://example.com/process/session/string/command/string"
{  "command": "string",  "exitCode": 0,  "id": "string"}
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

application/json

Input send request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

*/*

*/*

*/*

*/*

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

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

application/json

Command execution request

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

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"}