Skip to content

Execute a command

POST
/v1/sandbox/{sandboxID}/process/execute

Run a one-shot command inside the sandbox, optionally applying environment variables to that spawned process only, and wait for the result.

sandboxID
required
string

Unique sandbox identifier.

object
command
required

Shell command to execute.

string
Example
python3 --version
cwd

Working directory for the command.

string
nullable
Example
/home/user
envs

Environment variables applied only to the spawned process for this request.

object
key
additional properties
string
Example
{
"NAME": "leap0",
"PLACE": "sandbox"
}
timeout

Timeout in seconds (default 30).

integer
Example
30

Command executed.

object
exit_code
required

Process exit code.

integer
0
stdout
required

Standard output captured from the process.

string
Example
Python 3.12.12
stderr
required

Standard error captured from the process.

string

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string