sandboxrouter
Open source · 10 providers

One API for every sandbox.

Your AI agent needs a safe computer to run its code. sandboxrouter starts it on the best provider for the job, and moves to the next one if that provider is busy. Like OpenRouter, but for sandboxes.

npm i @sandboxrouter/sdk
router
sandboxrouter
  • Maritime✓ $0.022/hr
  • Morph Cloud$0.100/hr
  • E2B$0.166/hr
  • Daytona$0.166/hr
  • Modal$0.239/hr
  • Vercel Sandbox$0.341/hr

Picks the cheapest provider that fits

Providers
10
Cheapest, 2 vCPU · 4 GB
$0.022/hr
Price spread
15x
License
MIT

Write it once. Run it anywhere.

Set the keys for the providers you use. sandboxrouter skips the rest, explains why, and gives every sandbox a portable id like maritime:sbx-k3m7q2ab you can reattach to from any process.

  • strategy: "cheapest" sorts by list price for your machine size
  • strategy: "fastest" uses cold starts you measured with bench
  • require: ["pause"] only tries providers that can pause
  • fallback: false turns automatic fallback off
import { Router } from "@sandboxrouter/sdk";

const router = new Router();          // reads provider keys from env
const sbx = await router.create({ vcpu: 2, memoryGb: 4 });

const r = await sbx.exec("python3 -c 'print(6*7)'");
console.log(r.stdout, sbx.provider);  // 42 maritime
await sbx.kill();

One API

create, exec, files, pause, kill. The same five calls on every provider, in TypeScript, Python or plain HTTP.

Routing

Send each sandbox to the cheapest provider, the fastest one you've measured, or the only one with a GPU.

Automatic fallback

If a provider is rate-limited or down, the next one takes the sandbox. Every attempt is recorded.

Streaming output

Watch stdout and stderr as they happen, on every provider, without learning ten streaming APIs.

Desktops and phones

Linux and Windows desktops and Android phones for computer-use agents, with a takeover link for logins.

Your keys

Bring your own accounts. Nothing is proxied through anyone else. MIT licensed and open source.

Cheapest sandboxes right now

List price per hour for 2 vCPU and 4 GB while running.

All 10 →
  1. 1Maritimedefault$0.022/hr
  2. 2Morph Cloud$0.100/hr
  3. 3Fly.io Sprites$0.165/hr
  4. 4E2B$0.166/hr
  5. 5Daytona$0.166/hr