Ephemeral Sandboxes
Short-lived environments for one-shot code execution and testing
Overview
Ephemeral sandboxes are short-lived environments that automatically terminate after a timeout. Use them for running scripts, executing tests, or processing data.
Create
bash
curl -X POST https://api.scalix.world/v1/sandboxes \
-H "Authorization: Bearer $SCALIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"runtime": "node22",
"timeout_ms": 300000
}'Valid runtime values: python3.12, python3.13, node22, node24, go1.22, rust-latest.
Execute Code
bash
curl -X POST https://api.scalix.world/v1/sandboxes/{id}/commands \
-H "Authorization: Bearer $SCALIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cmd": "node", "args": ["-e", "console.log(2+2)"]}'Lifecycle
- Created — sandbox is provisioning
- Running — ready to accept commands
- Terminated — timeout reached or manually stopped
Ephemeral sandboxes are deleted automatically after termination. No data persists.
Resource Limits
| Resource | Default | Max |
|---|---|---|
| Memory | 512 MB | 32 GB |
| vCPUs | 1 | 16 |
| Disk | 5 GB | 100 GB |
| Timeout | 300s (5 min) | 86400s (24 h) |