Skip to main content
POST
id
string
required
Sandbox id from POST /v1/sandboxes.
code
string
required
Source code to execute.
language
string
default:"python"
python or bash. Python uses the sandbox’s persistent REPL (state carries across calls); bash runs in a fresh subprocess.

Semantics

  • REPL state persists across Python exec calls. Variables, imports, and open file handles stay alive.
  • Bash does not persist. Each bash exec is a fresh subprocess.
  • Serialized per sandbox. Only one exec runs at a time. Concurrent requests queue; if you want parallelism, fork().
  • Exceptions don’t poison the REPL. An uncaught Python exception produces exit.data != 0 but the next call still works.

Timing