v2

latestOpenAPI 3.1.0Proprietaryraw.githubusercontent.com2026-04-0912817.8 KB
Exec

Execute a command inside a sandbox

Runs a command inside the sandbox and waits for it to finish, returning stdout, stderr, and exit code. Idle sandboxes are automatically resumed before execution.

post/sandboxes/{sandbox_id}/exec

Request body

commandstring required

Command to execute. Wrapped in /bin/sh -c unless args is provided.

argsstring[]

If provided, command is used as the binary and args as arguments (no shell wrapping).

envobject

Environment variables for the command.

working_dirstring

Working directory (default /home/user).

timeout_sinteger

Timeout in seconds.

Response

Command executed

stdoutstring
stderrstring
exit_codeinteger