Skip to main content

Environments

Each sandbox is a pre-built Linux image. Pick the flavor that fits your workload.

Available flavors

FlavorPreinstalled
python-3.12Python 3.12, pip, numpy, pandas, requests, git
node-20Node.js 20, npm, yarn, git
browserChromium, Playwright, xvfb, Python 3.12
fullEverything above + jq, ffmpeg, ImageMagick

The default flavor is python-3.12.

Resource limits

SettingDefaultMaximum
Memory512 MB8192 MB
vCPU14
TTL60 min480 min

Specifying a flavor

const sb = await Sandbox.create({ flavor: 'node-20' });
const sb = await Sandbox.create({ flavor: 'browser', memory: 2048 });

// or with using()
await Sandbox.using(async (sb) => {
// ...
}, { flavor: 'full', memory: 4096, cpu: 2 });

Installing additional packages

You can install anything at runtime with exec(). The install persists for the lifetime of that sandbox.

# Python packages
pip install scikit-learn torch transformers

# Node packages
npm install axios cheerio

# System packages
apt-get install -y curl build-essential

Sandbox lifetime

Sandboxes are deleted when:

  • You call delete() or exit the context manager / using() block
  • The TTL expires (default 60 minutes)
  • The sandbox encounters a fatal error

Nothing persists between sandboxes. Each one starts from a clean image.