A Sandbox is a dedicated Alpine Linux Nitro Sandbox with a persistent 8 GiB writable root disk that survives idle stops until you destroy it. Sandboxes run in a separate host pool from Workers.
The default base image includes a shell, Python 3 + pip, Node + npm, git, curl, a C/C++ toolchain, and the bindings forwarder (SKOPIK_BINDINGS_URL).
#Creating & Running Commands
Choose 1 or 2 vCPUs and 256–1024 MiB of memory (defaults: 1 vCPU, 512 MiB). Size, bindings, and mounts are fixed at creation time.
skopik create_sandbox --vcpus 1 --memory-mib 512
skopik exec_in_sandbox --sandbox-id sbx_... --command "python3 --version && git --version"
skopik destroy_sandbox --sandbox-id sbx_...# Create a Sandbox
curl -X POST https://api.platform.skopik.com/v1/sandboxes \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "content-type: application/json" \
-d '{"vcpus": 1, "memory_mib": 512}'
# Run a command (add "stream": true for NDJSON streaming)
curl -X POST https://api.platform.skopik.com/v1/sandboxes/$SANDBOX/exec \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "content-type: application/json" \
-d '{"command": "python3 -c \"print(6*7)\"", "timeout_secs": 60}'{
"tool": "exec_in_sandbox",
"arguments": {
"sandbox_id": "sbx_...",
"command": "python3 -c 'print(6*7)'",
"timeout_secs": 60
}
}- Timeouts: Commands default to a 60-second timeout (maximum 1 hour). Timed-out commands and their child processes are terminated.
- Streaming: Pass
"stream": truetoPOST /v1/sandboxes/{id}/execto receive newline-delimited JSON frames (stdout,stderr,exit).
#Files & Directory Listing
- HTTP routes:
PUT /v1/sandboxes/{id}/files?path=/work/app.py&mode=644andGET /v1/sandboxes/{id}/files?path=/work/app.pystream raw files up to 1 GiB. - MCP tools:
write_sandbox_fileandread_sandbox_filetransfer UTF-8 or base64 files up to 4 MiB. - Directory listing:
GET /v1/sandboxes/{id}/dir?path=/work(MCPlist_sandbox_files) returns paginated entries withname,type,size,mode,modified_at, and symlinktarget.
#Idle Stop & Automatic Backups
- A Sandbox with no active command, file transfer, or CDP session stops after 5 minutes of idle time, freeing host memory while keeping its disk intact.
- On every stop, changed 1 MiB disk chunks are compressed with zstd and backed up to S3. If a host is replaced, the next call automatically restores the Sandbox on another host.
- Destroying a Sandbox deletes both its disk and its S3 backup immediately.
#Browser Sandboxes (CDP)
Create a Sandbox with "image": "browser" to launch an isolated Chromium environment accessible over the Chrome DevTools Protocol (CDP):
curl -X POST https://api.platform.skopik.com/v1/sandboxes \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "content-type: application/json" \
-d '{"image": "browser", "vcpus": 2, "memory_mib": 1024}'Connect Playwright or Puppeteer via authenticated WebSocket to:
wss://api.platform.skopik.com/v1/sandboxes/{id}/cdpInclude Authorization: Bearer <SKOPIK_API_KEY> in the WebSocket upgrade headers. Nothing else on the internet can reach the browser instance.