Run a command
Starts a command and returns it. With wait: true the response comes when the command finished, for at most 60 seconds, and includes its output. Requires run_commands. Environment: the sandbox’s env, then the request’s. Commands and file operations need an ACTIVE sandbox; on any other state they answer 409.
Authorizations
workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens
Headers
Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.
1 - 53"ws_j572abc123def456"
Path Parameters
Sandbox id (sbx_...).
^sbx_[A-Za-z0-9]{1,64}$"sbx_j572abc123def456"
Body
- Option 1
- Option 2
Program and arguments, run without a shell.
1 - 256 elements16384Absolute path inside the sandbox.
1 - 4096^\/[^\0]*$"/workspace/README.md"
Seconds before the command is killed. Default 600.
1 <= x <= 86400Return when the command finished, for at most 60 seconds, with its output. Otherwise return as soon as it started.
Keep standard input open for :writeStdin. Default false (empty input).
Response
Command started
Sandbox command id (cmd_...).
^cmd_[A-Za-z0-9]{1,64}$"cmd_j572abc123def456"
Sandbox id (sbx_...).
^sbx_[A-Za-z0-9]{1,64}$"sbx_j572abc123def456"
SUCCEEDED: exited with code 0. FAILED: exited with another code, was killed, or hit its timeout (exit code 124).
RUNNING, SUCCEEDED, FAILED, CANCELLED Set once the command finished.
Start time (Unix seconds).
x >= 0Finish time (Unix seconds).
x >= 0Captured output, only on the response to a wait: true request that finished in time; null elsewhere.