Getting Started
Sandbox gives you isolated Linux environments via a simple REST API. Create a sandbox, run commands, read/write files, and tear it down when you're done. No SDK required — just HTTP.
Get your API key
All API requests require a Bearer token. Generate one here or from your dashboard.
Create a sandbox
Spin up an isolated Linux environment with sensible defaults. Just POST to the endpoint.
curlcurl -X POST https://sandbox.developersdigest.tech/api/v1/sandboxes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"node.jsconst res = await fetch('https://sandbox.developersdigest.tech/api/v1/sandboxes', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const sandbox = await res.json();
// { id: "sb_abc123", status: "running", ... }pythonimport requests
res = requests.post(
"https://sandbox.developersdigest.tech/api/v1/sandboxes",
headers={"Authorization": "Bearer YOUR_API_KEY"},
)
sandbox = res.json()
print(sandbox["id"]) # sb_abc123Execute a command
Run any shell command inside the sandbox. You get stdout, stderr, exit code, and execution time.
curlcurl -X POST https://sandbox.developersdigest.tech/api/v1/sandboxes/SANDBOX_ID/exec \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command": "echo Hello && python3 -c \"print(2+2)\"" }'node.jsconst exec = await fetch(
`https://sandbox.developersdigest.tech/api/v1/sandboxes/${sandbox.id}/exec`,
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ command: 'pip install pandas && python3 -c "import pandas; print(pandas.__version__)"' }),
}
);
const result = await exec.json();
// { stdout: "2.2.0\n", stderr: "", exitCode: 0, durationMs: 4521 }Read & write files
Full filesystem access. Write code, read results, list directories.
curl — write a filecurl -X PUT "https://sandbox.developersdigest.tech/api/v1/sandboxes/SANDBOX_ID/files?path=/app/hello.py" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "print(\"Hello from sandbox!\")"}'node.js — write + run// Write a file
await fetch(`https://sandbox.developersdigest.tech/api/v1/sandboxes/${id}/files?path=/app/hello.py`, {
method: 'PUT',
headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ content: 'print("Hello from sandbox!")' }),
});
// Run it
const exec = await fetch(`https://sandbox.developersdigest.tech/api/v1/sandboxes/${id}/exec`, {
method: 'POST',
headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ command: 'python3 /app/hello.py' }),
});
console.log((await exec.json()).stdout); // Hello from sandbox!curl — read a filecurl "https://sandbox.developersdigest.tech/api/v1/sandboxes/SANDBOX_ID/files?path=/app/hello.py" \
-H "Authorization: Bearer YOUR_API_KEY"
# { "path": "/app/hello.py", "content": "print(\"Hello from sandbox!\")" }curl — list directorycurl "https://sandbox.developersdigest.tech/api/v1/sandboxes/SANDBOX_ID/files?path=/app&list=true" \
-H "Authorization: Bearer YOUR_API_KEY"
# { "path": "/app", "files": [...] }Kill the sandbox
Clean up when you're done. Compute stops billing the second you kill it.
curlcurl -X DELETE https://sandbox.developersdigest.tech/api/v1/sandboxes/SANDBOX_ID \
-H "Authorization: Bearer YOUR_API_KEY"
# { "id": "sb_abc123", "status": "stopped" }node.jsawait fetch(`https://sandbox.developersdigest.tech/api/v1/sandboxes/${sandbox.id}`, {
method: 'DELETE',
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
});Use a language template
Pass an image parameter to use a specific runtime. Available templates:
python:3.12-slimnode:22-alpinegolang:1.23-alpinerust:1-slimubuntu:24.04alpine:latestcurlcurl -X POST https://sandbox.developersdigest.tech/api/v1/sandboxes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"image": "node:22-alpine"}'node.jsconst res = await fetch('https://sandbox.developersdigest.tech/api/v1/sandboxes', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ image: 'python:3.12-slim' }),
});API Reference
Base URL: https://sandbox.developersdigest.tech/api/v1. All endpoints require Authorization: Bearer YOUR_API_KEY.
Sandboxes
/sandboxesCreate a new sandbox.
Request body
{
"vcpus": 1, // 1-4 (pro: up to 4)
"memoryMb": 512, // 512-4096
"storageMb": 1024, // disk size
"timeoutMs": 1800000,// auto-kill after 30min
"templateId": "default",
"envVars": { "KEY": "value" }
}Response
{
"id": "sb_abc123",
"status": "running",
"vcpus": 1,
"memoryMb": 512,
"region": "us-east-1",
"expiresAt": "2026-03-13T12:30:00.000Z",
"createdAt": "2026-03-13T12:00:00.000Z"
}/sandboxesList all your sandboxes.
Response
[{ "id": "sb_abc123", "status": "running", ... }]/sandboxes/:idGet sandbox details.
Response
{ "id": "sb_abc123", "status": "running", "vcpus": 1, ... }/sandboxes/:idKill a sandbox and stop billing.
Response
{ "id": "sb_abc123", "status": "stopped" }Execution
/sandboxes/:id/execExecute a command and wait for output.
Request body
{
"command": "echo hello",
"timeoutMs": 30000
}Response
{
"stdout": "hello\n",
"stderr": "",
"exitCode": 0,
"durationMs": 12
}/sandboxes/:id/processesStart a background process (long-running servers, etc).
Request body
{
"command": "python3 -m http.server 8080",
"cwd": "/app",
"env": { "PORT": "8080" }
}Response
{ "pid": 42, "command": "python3 -m http.server 8080" }/sandboxes/:id/processesList running processes.
/sandboxes/:id/processesKill all running processes.
Files
/sandboxes/:id/files?path=/appRead a file's contents.
Response
{ "path": "/app/index.js", "content": "..." }/sandboxes/:id/files?path=/app&list=trueList files in a directory.
Response
{ "path": "/app", "files": ["index.js", "package.json"] }/sandboxes/:id/files?path=/app/index.jsWrite a file.
Request body
{ "content": "console.log('hello')" }Response
{ "path": "/app/index.js", "written": true }/sandboxes/:id/files?path=/app/tmp&recursive=trueDelete a file or directory.
Response
{ "path": "/app/tmp", "deleted": true }Lifecycle
/sandboxes/:id/pausePause a running sandbox. No billing while paused.
Response
{ "id": "sb_abc123", "status": "paused" }/sandboxes/:id/resumeResume a paused sandbox.
Response
{ "id": "sb_abc123", "status": "running" }/sandboxes/:id/portsExpose a port with a public URL.
Request body
{ "port": 8080 }Response
{ "port": 8080, "url": "https://sb-abc123-8080.sandbox.dev" }/sandboxes/:id/portsList exposed ports.
Pricing
Free
1 hour/mo
3,600 compute seconds. No credit card.
Pro — $20/mo
30 hours/mo
108,000 compute seconds. Per-second billing.
Billing is per-second, rounded up. You only pay for the time your sandbox is running. Paused sandboxes don't count.