Skip to main content
POST
/
computers
/
{id}
/
bash
Execute bash
curl --request POST \
  --url https://www.orgo.ai/api/computers/{id}/bash \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "command": "ls -la /home/user"
}
'
{
  "output": "total 32\ndrwxr-xr-x 4 user user 4096 Jan 15 10:30 .\ndrwxr-xr-x 3 root root 4096 Jan 15 10:00 ..\n-rw-r--r-- 1 user user  220 Jan 15 10:00 .bashrc\ndrwxr-xr-x 2 user user 4096 Jan 15 10:30 Desktop\n",
  "success": true
}

Documentation Index

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

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

Executes a bash command on the computer and returns the combined stdout/stderr output.

Path parameters

id
string
required
Computer ID (UUID).

Body parameters

command
string
required
Bash command to execute.
timeout
integer
default:"200"
Maximum execution time in seconds before the command is killed.

Response

output
string
Combined stdout and stderr.
exit_code
integer
Process exit code.
command
string
Echo of the command that was executed.
success
boolean
true if the command ran (regardless of exit code). Check exit_code to determine if the command itself succeeded.

Example

curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/bash \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": "ls -la /home/user"}'

Response

{
  "success": true,
  "action": "bash",
  "command": "ls -la /home/user",
  "output": "total 32\ndrwxr-xr-x 4 user user 4096 Jan 15 10:30 .\ndrwxr-xr-x 3 root root 4096 Jan 15 10:00 ..\n-rw-r--r-- 1 user user  220 Jan 15 10:00 .bashrc\ndrwxr-xr-x 2 user user 4096 Jan 15 10:30 Desktop\n",
  "exit_code": 0
}
For Python code execution, use Execute Python instead.

Errors

StatusMeaning
400Computer instance not available.
401Missing or invalid API key.
403You do not have access to this computer.
404Computer not found.
500Upstream desktop agent failure (process spawn error, timeout killed).

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Path Parameters

id
string
required

Computer ID

Body

application/json
command
string
required

Bash command to execute

Response

Command executed

output
string

Command output

success
boolean

Whether command succeeded