Skip to main content
POST
/
v1
/
sandboxes
/
{id}
/
exec
Execute a command in a sandbox
curl --request POST \
  --url https://api.runtools.ai/v1/sandboxes/{id}/exec \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "command": "<string>",
  "timeout": 30000,
  "cwd": "/workspace",
  "env": {}
}
'
{
  "data": {
    "stdout": "<string>",
    "stderr": "<string>",
    "exitCode": 123,
    "durationMs": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.runtools.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

WorkOS session token or RunTools API key (rt_live_* / rt_test_*). Used in Authorization: Bearer <token> header.

Path Parameters

id
string
required

Body

application/json
command
string
required
timeout
integer
default:30000

Timeout in milliseconds.

cwd
string
default:/workspace
env
object

Response

200 - application/json

Result.

data
object