Process
Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts
Code execution request
application/json- body
argv?array<string>code*stringenvs?language*stringpython, javascript, typescript
timeout?integerOK
application/json- response
artifacts?exitCode?integerresult?stringcurl -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 shell command and return the output and exit code
Command execution request
application/json- body
command*stringcwd?stringCurrent working directory
envs?Environment variables to set for the command
timeout?integerTimeout in seconds, defaults to 10 seconds
OK
application/json- response
exitCode?integerresult*stringcurl -X POST 'https://example.com/process/execute' \ -H 'Content-Type: application/json' \ -d '{ "command": "string"}'{ "exitCode": 0, "result": "string"}Get a list of all active pseudo-terminal sessions
OK
application/json- 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 pseudo-terminal session with specified configuration
PTY session creation request
application/json- body
cols?integercwd?stringenvs?id?stringlazyStart?booleanDon't start PTY until first client connects
rows?integerCreated
application/json- response
sessionId*stringcurl -X POST 'https://example.com/process/pty' \ -H 'Content-Type: application/json' \ -d '{}'{ "sessionId": "string"}Get detailed information about a specific pseudo-terminal session
sessionId*stringPTY session ID
OK
application/json- response
active*booleancols*integercreatedAt*stringcwd*stringenvs*id*stringlazyStart*booleanWhether this session uses lazy start
rows*integercurl -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 pseudo-terminal session and terminate its process
sessionId*stringPTY session ID
OK
application/json- response
[key: string]?unknowncurl -X DELETE 'https://example.com/process/pty/string'{ "property1": null, "property2": null}Establish a WebSocket connection to interact with a pseudo-terminal session
sessionId*stringPTY session ID
Switching Protocols - WebSocket connection established
curl -X GET 'https://example.com/process/pty/string/connect'Resize the terminal dimensions of a pseudo-terminal session
sessionId*stringPTY session ID
Resize request with new dimensions
application/json- body
cols*integer1 <= value <= 1000rows*integer1 <= value <= 1000OK
application/json- response
active*booleancols*integercreatedAt*stringcwd*stringenvs*id*stringlazyStart*booleanWhether this session uses lazy start
rows*integercurl -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 a list of all active shell sessions
OK
application/json- response
[index: integer]?curl -X GET 'https://example.com/process/session'[ { "commands": [ { "command": "string", "exitCode": 0, "id": "string" } ], "sessionId": "string" }]Create a new shell session for command execution
Session creation request
application/json- body
sessionId*stringCreated
curl -X POST 'https://example.com/process/session' \ -H 'Content-Type: application/json' \ -d '{ "sessionId": "string"}'Get details of an entrypoint session including its commands
OK
application/json- response
commands*array<>sessionId*stringcurl -X GET 'https://example.com/process/session/entrypoint'{ "commands": [ { "command": "string", "exitCode": 0, "id": "string" } ], "sessionId": "string"}Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming.
follow?booleanFollow logs in real-time (WebSocket only)
Entrypoint log content
- response
output*stringstderr*stringstdout*stringcurl -X GET 'https://example.com/process/session/entrypoint/logs'{ "output": "string", "stderr": "string", "stdout": "string"}Get details of a specific session including its commands
sessionId*stringSession ID
OK
application/json- response
commands*array<>sessionId*stringcurl -X GET 'https://example.com/process/session/string'{ "commands": [ { "command": "string", "exitCode": 0, "id": "string" } ], "sessionId": "string"}Delete an existing shell session
sessionId*stringSession ID
No Content
curl -X DELETE 'https://example.com/process/session/string'Get details of a specific command within a session
sessionId*stringSession ID
commandId*stringCommand ID
OK
application/json- response
command*stringexitCode?integerid*stringcurl -X GET 'https://example.com/process/session/string/command/string'{ "command": "string", "exitCode": 0, "id": "string"}Send input data to a running command in a session for interactive execution
sessionId*stringSession ID
commandId*stringCommand ID
Input send request
application/json- body
data*stringNo Content
curl -X POST 'https://example.com/process/session/string/command/string/input' \ -H 'Content-Type: application/json' \ -d '{ "data": "string"}'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.
sessionId*stringSession ID
commandId*stringCommand ID
follow?booleanFollow logs in real-time (WebSocket only)
Log content (JSON for new SDKs, plain text for old SDKs)
- response
output*stringstderr*stringstdout*stringcurl -X GET 'https://example.com/process/session/string/command/string/logs'{ "output": "string", "stderr": "string", "stdout": "string"}Execute a command within an existing shell session
sessionId*stringSession ID
Command execution request
application/json- body
async?booleancommand*stringrunAsync?booleansuppressInputEcho?booleanOK
application/json- response
cmdId*stringexitCode?integeroutput?stringstderr?stringstdout?stringcurl -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"}