Boot a fresh machine for every run in 50 ms.5
Run 1,000 tasks from one script.
- 1Change two settings
Point the SDK here.9
- 2Start all 1,000 at once
Each on a machine from your template.
- 3Collect every result
Each machine ends with its task.
import asyncio from e2b import AsyncSandbox async def grade(task, limit): async with limit: sbx = await AsyncSandbox.create("your-eval-env", timeout=600) try: cmd = f"python grade.py {task}" r = await sbx.commands.run(cmd, timeout=600) # 10 minutes return task, r.stdout finally: await sbx.kill() async def main(): limit = asyncio.Semaphore(1000) # up to 1,100 at once on Pro runs = [grade(t, limit) for t in range(1000)] return await asyncio.gather(*runs, return_exceptions=True) results = asyncio.run(main()) print(len(results), "graded")
import { Sandbox } from 'e2b' const tasks = [...Array(1000).keys()] const results = [] const timeoutMs = 600_000 // 10 minutes async function worker() { while (tasks.length) { const task = tasks.shift() const sbx = await Sandbox.create('your-eval-env', { timeoutMs }) try { const cmd = `python grade.py ${task}` const r = await sbx.commands.run(cmd, { timeoutMs }) results.push([task, r.stdout]) } finally { await sbx.kill() } } } // up to 1,100 at once on Pro await Promise.allSettled(Array.from({ length: 1000 }, worker))
Pay at most $11.04 for 1,000 five-minute runs.11
Each run has its own machine with every vCPU busy the whole time. A run that waits on a model costs less. Usage only; Pro’s $99 a month and any machines you add are separate.
Work out your own billHow many machines can I run at once?
One on Free, 20 with a card on file and 100 on Pro. On Pro, 500 more cost $400 a month, up to 1,100; Custom goes past 1,100.
What stops a surprise bill?
A spend cap you set, with alerts at 50%, 80% and 100%. At the cap, new machines are refused and running ones pause.
Do I pay for size or use?
You pay for the CPU your agent uses and the memory it holds, by the second. An hour your agent mostly waits costs less.
How big can each machine be?
Up to 1 vCPU and 1 GiB on Free, 2 vCPU and 4 GiB with a card on file and 8 vCPU and 8 GiB on Pro. Custom sets its own.
Can I bring my own environment?
Yes. Build your own template once and start every run from it. 20 builds run at once, on every plan.
Can a run reach the internet?
Yes, through your network rules: allow and deny lists set what each machine may reach.
Get 30 minutes free every day, forever.2
Sign up with a GitHub account at least six months old, or a card check that is never charged.