Overview
The Sandbox API provides VM-based code execution with configurable resources, network access, and toolchains. Sandboxes run on infrastructure you control. For organization-scoped templates and long-lived instances, see Cloud Sandboxes.Base URL
Endpoints
Get capabilities
Execute code
Response:
Files in and out
Passfiles to stage uploads (from POST /api/v1/uploads) into the sandbox working folder as in/<name>. Whatever the code writes to out/ comes back in the response as files, each stored as an upload you can fetch with GET /api/v1/uploads/:id.
size (bytes stored) and url (where to fetch it). Downloads use the protective headers listed in Uploads API. files is left out of the response when the request staged no files. Input and output are each limited to 20 MB in total. A file name must not be empty or contain /, \, quotes or control characters. files needs the VM sandbox: the plain-subprocess fallback used when no VM driver is configured refuses it, and /sandbox/execute/stream rejects it with 400 files_unsupported.
Streaming execution
Health check
Security
- Buffered
/sandbox/execute(execute_handler) runs on the VM driver; when a warm pool is configured it checks out a health-checked VM and returns it afterwards, and a checkout failure returns 503 rather than falling back to an unsandboxed run. /sandbox/execute/streamdoes not use the VM driver or the pool. It spawns the process directly on the API host with a cleared, allow-listed environment, supportspython,nodeandbash, and caps the timeout at 300 seconds. Use/sandbox/executewhen you need VM isolation.network_enableddefaults tofalse.- Execution timeout is enforced by the server.