v7

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2026-01-26163065.1 KB

post/v1/sandboxes/{id}/execute

Path parameters

idstring required

Sandbox ID

Sandbox ID

Request body

commandstring required

Command to execute (full CLI command, supports shell features like redirection, pipes, etc.)

envobject

Environment variables

timeoutinteger

Execution timeout in seconds

working_dirstring

Working directory for execution

Example request

{
  "command": "python -c \"print('Hello, World!')\"",
  "timeout": 5
}

Response

Execution completed

idstring required

Execution ID

status'running' | 'completed' | 'timeout' | 'error' required

Execution status

exit_codeinteger required

Exit code

stdoutstring required

Standard output

stderrstring required

Standard error output

execution_time_msinteger required

Execution time in milliseconds

created_atstring required

Execution start timestamp

completed_atstring required

Execution completion timestamp

Example response

{
  "id": "exec_m1n2o3p4q5r6s7t8",
  "status": "completed",
  "exit_code": 0,
  "stdout": "Hello, World!\n",
  "stderr": "",
  "execution_time_ms": 142,
  "created_at": "2024-01-15T12:30:00Z",
  "completed_at": "2024-01-15T12:30:00.142Z"
}