ScalixScalix Docs
Sign up

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

  1. Created — sandbox is provisioning
  2. Running — ready to accept commands
  3. Terminated — timeout reached or manually stopped

Ephemeral sandboxes are deleted automatically after termination. No data persists.

Resource Limits

ResourceDefaultMax
Memory512 MB32 GB
vCPUs116
Disk5 GB100 GB
Timeout300s (5 min)86400s (24 h)