One API for every sandbox.
On the cheapest one that's up.
16 providers pass our check on real accounts: start, run, stream, files, timeouts and kill. Your sandboxes go to the cheapest of them that fits, and move on when one fails. Open source, or one hosted key.
$ npm i @sandboxrouter/sdk
index.ts
import { Router } from "@sandboxrouter/sdk";
// uses whichever provider keys you've set
const sbx = await new Router().create();
console.log((await sbx.exec("echo hi")).stdout, sbx.provider);
await sbx.kill();Route
Each sandbox starts on the cheapest provider that fits, and moves on when one fails.
Out of credit, rate-limited or down: the next provider takes the sandbox, and every attempt is on sbx.attempts.
Your account there has no balance
$ sandboxrouter run "python3 -c 'print(6*7)'"! daytona402 no balance on your account → next› e2bstarted · $0.109/hr42
sbx.attempts.Price
Every provider's list price, side by side, at the size you ask for.
16 providers pass our real-account check. Ones that fail it are tried last.
Pricing
The same code with your own provider keys, or with one sandboxrouter key.
MIT licensed. Sandboxes run on your provider accounts and you pay each provider directly.
import { Client } from "@sandboxrouter/sdk";
const sr = new Client({
baseUrl: "https://api.sandboxrouter.ai",
apiKey: process.env.SANDBOXROUTER_API_KEY,
});
const sbx = await sr.create();
console.log((await sbx.exec("echo hi")).stdout, sbx.provider);
await sbx.kill();