E2B vs OpenAI Containers
E2B gives each agent its own small Linux machine with root and Docker that you drive through an SDK and can pause and resume. OpenAI Containers are a tool inside OpenAI's model API: the model runs code in a short-lived box with no sudo, and the box and its files go away after 20 minutes without use.
The companies and products
E2B
E2B calls itself the AI agent cloud: an API that gives each agent session its own isolated Linux machine.
Every E2B sandbox is a Firecracker microVM that boots from a snapshot, so it starts fast and can be paused and resumed with its memory. You build custom sandboxes from templates based on a Docker image, and drive them from Python or JavaScript SDKs. It is built for teams that run many short code, data or agent jobs, and its runtime is open source.
- Isolation
- Firecracker microVM per sandbox
- Bring your own cloud
- Enterprise data plane in your AWS, GCP or Azure account
- Compliance
- SOC 2 Type II; HIPAA BAA on request
- Machine size
- 1 to 8 vCPU and 1 to 8 GiB RAM, CPU only
OpenAI Containers
OpenAI Containers are the sandboxes OpenAI runs for its own model tools: Code Interpreter, Hosted Shell and the Agents API's hosted sandbox.
This is a different kind of product from boat: a tool inside OpenAI's model API, not a machine you rent. You create a container through the API or let a Responses call make one, and the model runs Python or shell commands in it on a fixed Debian 12 image without sudo, until it expires after 20 minutes without use. It is built for apps that already call OpenAI models and want them to run code, read files and make charts without running any servers.
Which use cases each one fits
For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “16th cheapest of 367” means 15 of the other 366 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.
| Use case and its workload | E2B: price rank | OpenAI Containers: price rank | boat: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month A coding agent needs root, Docker and a repo that stays, which E2B has for up to 24 hours on Pro and OpenAI Containers do not have at all; boat adds no session cap and /dev/kvm. | 16th cheapest of 367 $4,143 a month | 356th of 367, with limits $17,371 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An assistant that lives on its machine all month has to pause and resume on E2B every 24 hours, and on OpenAI it loses everything after 20 idle minutes; boat simply keeps running. | 51st of 366, with limits $5,348 a month | 341st of 366, with limits $13,140 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month Both fit short code runs: OpenAI Containers live inside the model call, while E2B starts a sandbox fast and can pause it with its memory between requests. | 37th cheapest of 345 $421 a month | 194th of 345, with limits $6,000 a month | 186th of 345, with limits $2,000 a month |
| Sandboxes for your users 300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month E2B gives your users a URL per port and wakes a paused sandbox on the next request; an OpenAI container has no inbound access, and boat adds SSH, raw TCP and token-protected URLs. | 23rd cheapest of 361 $2,354 a month | 361st of 361, with limits $3,780 a month | Cheapest of 361 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month E2B's memory fork and high start rate suit many short rollouts that branch from the same state, which OpenAI Containers cannot fork. | 2nd cheapest of 360 $9,384 a month | 191st of 360, with limits $30,000 a month | 34th of 360, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 78th cheapest of 364 $1,975 a month | 360th of 364, with limits $5,760 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month CI jobs need Docker, root and open internet; E2B has those but no nested virtualization, OpenAI documents none of them, and boat has all of them with faster CPUs. | 337th of 377, with limits $1,429 a month | 345th of 377, with limits $1,728 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box you SSH into and keep all month needs no session cap and a disk that persists, which boat has, E2B caps at 24 hours, and OpenAI does not offer. | 192nd of 368, with limits $358 a month | 362nd of 368, with limits $1,051 a month | 18th cheapest of 368 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month E2B has a Linux desktop for computer use and OpenAI has a hosted browser in the Agents API beta; boat streams a 60fps desktop you can embed in your app. | 32nd cheapest of 369 $1,342 a month | 351st of 369, with limits $5,280 a month | 6th cheapest of 369 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 100th of 367, with limits $746 a month | 328th of 367, with limits $1,440 a month | 7th cheapest of 367 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 57th cheapest of 346 $554 a month | 328th of 346, with limits $1,755 a month | 6th cheapest of 346 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 227th of 338, with limits $9,223 a month | 311th of 338, with limits $35,100 a month | 71st of 338, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 11th cheapest of 360 $1,043 a month | 308th of 360, with limits $870 a month | 2nd cheapest of 360 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month | Can't run it | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | E2B | OpenAI Containers | boat |
|---|---|---|---|
| What it is | An API that gives each agent session its own Linux machine | A sandbox tool the model uses inside OpenAI's API | A cloud VM you create, keep, stop and reach from outside |
| Isolation | Firecracker microVM with its own kernel | A fully sandboxed virtual machine; hypervisor not named | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Root, Docker and nested virtualization | Root, systemd and Docker inside; nested virtualization not supported | Commands do not run with sudo; no Docker or /dev/kvm documented | Root, systemd, Docker and /dev/kvm on every machine |
| CPU benchmark (4 vCPU / 8 GB) | 12.61 runs/s | Not measured; vCPU per size not published | 26.69 runs/s |
| Machine size | Up to 8 vCPU / 8 GiB self-serve, more on request | 1, 4, 16 or 64 GB of memory; vCPU not published | 4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB |
| Session length | Up to 1 hour on Hobby, 24 hours on Pro; pausing resets the clock | Expires after 20 minutes without use; Agents API sandboxes after an hour without activity | No cap on paid plans; you set the time to live |
| Files after the session | Pause saves memory and disk; resume takes about 1 second with processes still running | Data is discarded when the container expires and cannot be recovered | Disk saved every minute and on stop; a stopped sandbox costs nothing and comes back |
| Fork | Fork a running sandbox with its memory, up to 20 copies per call | No fork; templates save configuration, not a running workspace | Fork a running sandbox with its disk |
| Custom image | Templates built from a Docker image | Fixed Debian 12 image; you upload files or skills into each container | Named snapshots of a set-up machine, reused as templates |
| Inbound access | HTTPS URL per port, public by default unless you turn on a token; no dedicated IP | None; you reach the container only through the API | SSH, HTTPS URLs for up to 50 ports, token-protected by default, raw TCP and a dedicated IP |
| Outbound internet | Open by default, with allow and deny lists by IP, CIDR or domain | Code Interpreter and Hosted Shell: off until an admin sets an org domain allowlist. Agents API: on by default, can be limited to 1 to 100 hosts | Open internet on every plan; no provider-side allowlist |
| Keeping API keys out of the sandbox | Secrets injected into outbound HTTPS headers (private beta) | domain_secrets: a sidecar adds the real header for approved domains, the model sees a placeholder | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Coding agents | Templates and guides for many agents, run through the command API | Agents API (beta) drives a managed Codex harness from outside, with steering, events and webhooks | Claude Code, Codex and five other agents preinstalled, with a prompt, steer and events API |
| Regions and your own compute | US, EU and APAC; open-source runtime and bring your own cloud on Enterprise | US or EU processing for Code Interpreter; Agents API can drive a sandbox you host | EU only (Germany, Finland, France) |
Every feature Battleships tracks (43)
| Feature | E2B | OpenAI Containers | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | No | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | No | Yes |
| Systemd | Yes | Not published | Yes |
| Desktop GUI | Yes | Yes | Yes |
| Browser | Yes | Yes | Yes |
| Computer-use API | Yes | Yes | Yes |
| SSH | Yes | No | Yes |
| Persistent disk | Yes | No | Yes |
| Pause/resume | Yes | No | Yes |
| Automatic snapshots | Yes | No | Yes |
| Fork/clone | Yes | No | Yes |
| Live fork (no pause) | Yes | No | Yes |
| Memory fork | Yes | No | No |
| Custom image (Docker or snapshot) | Yes | No | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | Yes | No | No |
| HTTPS preview URLs | Yes | No | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | Yes | Yes | Yes |
| Secret proxy for any API | Yes | Yes | Yes |
| Preinstalled agents | Yes | No | Yes |
| Agent harness API | No | Yes | Yes |
| MCP server | Yes | No | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | Yes | Yes | No |
| BYOC | Yes | No | No |
| Open source | Yes | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Yes | Not published | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Not published | Not published | No |
| SSO | No | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | Yes | Yes | No |
| EU data residency | Yes | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
On the StarSling hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB, E2B did 12.61 runs per second and boat did 26.69, so boat finished about twice as much CPU work in the same time. OpenAI Containers have no comparable measurement: they are not in the benchmark, and OpenAI does not publish how many vCPU each container size gets.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. OpenAI Containers has no published run in this suite yet, so there is no like-for-like number to compare.
Pricing in five scenarios
Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.
| Scenario | E2B, a month | OpenAI Containers, a month | boat, a month |
|---|---|---|---|
| One coding agent, workdays 4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days | $202 · Pro | $228 · API pay as you go · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $368 · Pro · with limits | $1,051 · API pay as you go · with limits | $26 · $20/mo |
| 50 agents in parallel 50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside | $2,773 · Pro | $11,405 · API pay as you go · with limits | $317 · $20/mo × 3 seats |
| Sandboxes for your users 2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once | $1,395 · Pro+ (600 concurrent) | $1,620 · API pay as you go · with limits | $200 · $100/mo × 2 seats |
| 1,000 short jobs at once 2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month | $2,797 · Pro++ (1,100 concurrent) | $6,000 · API pay as you go · with limits | $2,000 · $2000/mo · with limits |
E2B: E2B bills per second for the vCPU and RAM you set, idle time included, until you pause or kill the sandbox. Pro costs $150 a month for higher limits with no usage credit, and more concurrency costs $500 a month per 500 slots.
OpenAI Containers: OpenAI bills each container session by the minute for the memory size you pick, with a 5-minute minimum, and model tokens are billed on top. There is no plan fee; the scenarios use the 16 GB size for 8 GB needs and the 4 GB size for 4 GB needs, since vCPU is not published.
OpenAI Containers: Plans start at $20 a month, and the whole fee is usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
E2B caps a session at 24 hours on Pro, so it does not fit the always-on scenario, and its Pro plan includes 20 GiB of disk with no published price for more. OpenAI Containers fit none of the five scenarios as written: no persistent disk, no Docker, no internet in Code Interpreter and Hosted Shell until an admin allows domains, and no published vCPU. OpenAI also does not publish how many containers can run at once, so 300 user sandboxes or a 1,000-job burst are unconfirmed. On boat the burst is limited by starts per hour and per day, while E2B Pro++ only queues bursts above 300 starts a minute.
| Scenario | E2B | OpenAI Containers | boat |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users |
|
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use E2B when
you need a real Linux machine with root and Docker for short or medium jobs, especially ones that pause between requests, fork with memory, or must run in the US or APAC.
- A real machine your agent controls. For agents that install packages or run Docker: E2B gives root, systemd and a URL per port, which OpenAI Containers do not.
- Memory pause, wake and fork. For short jobs that sleep between requests: a paused sandbox resumes in about a second and can be forked with its memory.
- Open source and more regions. For teams that want their own infrastructure: the runtime is Apache-2.0, Enterprise runs in your cloud, and it covers US, EU and APAC.
Use OpenAI Containers when
your app already calls OpenAI models and the model only needs to run short pieces of Python or shell on files you give it.
- Built into the model call. For apps that already call OpenAI models: one tool line in a request gives the model a place to run code.
- Locked-down network by default. For code that must reach only chosen hosts: Code Interpreter and Hosted Shell have no outbound access until an admin allows domains.
- No plan and nothing to clean up. For occasional runs: you pay by the minute for each session, and an idle container simply expires on its own.
Where boat fits
If what you are really running is coding agents that work for hours, both E2B and OpenAI Containers make you work around a limit: a 24-hour session cap on one, a box that forgets everything after 20 idle minutes on the other. boat gives each agent a full VM that keeps its disk, runs as long as you want, and did about twice E2B's CPU work on the same benchmark.
A whole machine that never cuts off
On E2B a long task hits the 24-hour cap and your code has to pause and resume it, and Android emulators cannot start without /dev/kvm. On OpenAI there is no sudo or Docker, and the box is deleted after 20 idle minutes.
Reachable from outside
An OpenAI container accepts no connections, so nobody can open the app an agent built. E2B gives a URL per port, public unless you add a token, but no raw TCP or dedicated IP. boat has SSH, 50 HTTPS ports and raw TCP.
Any agent, driven from outside, keys kept out
On E2B you build the agent harness yourself on the command API, and secret injection is in private beta. OpenAI's Agents API drives only its own Codex harness. boat preinstalls seven agents and keeps real keys in a credentials proxy.
Use boat when your agents do real work for hours: installs, builds, tests, Docker, emulators and a browser, on a fast machine that keeps its disk and never cuts them off. Compare it one to one: boat vs E2B and boat vs OpenAI Containers.
Questions people ask
Is E2B cheaper than OpenAI Containers?
In every scenario on this page, yes: one coding agent on workdays comes to $202 a month on E2B and $228 on OpenAI, and 50 agents in parallel come to $2,773 versus $11,405. OpenAI also bills model tokens on top. boat comes to $20 and $317 a month for the same two.
Which is faster, E2B or OpenAI Containers?
Only E2B has a public CPU score: 12.61 runs per second on the hpc-sandbox-benchmarks test at 4 vCPU / 8 GB. OpenAI does not publish the vCPU behind its container sizes, so there is no fair comparison. boat did 26.69 runs per second on the same test.
Can OpenAI Containers run Docker like E2B?
No Docker support is documented, and OpenAI's docs say hosted shell commands do not run with sudo. E2B runs Docker inside the sandbox with root. boat gives root, systemd, Docker and /dev/kvm on every machine.
How long can a sandbox run on E2B and on OpenAI?
E2B stops a session after 24 hours on Pro and 1 hour on Hobby, though pausing resets the clock. An OpenAI container has no fixed cap while in use but expires after 20 minutes without use, and its data is discarded. boat has no session cap on paid plans.
Can I open a web app running in the sandbox?
On E2B, yes: each port gets an HTTPS URL, public by default unless you turn on a token. OpenAI containers have no ports, URLs or SSH. boat gives HTTPS URLs for up to 50 ports, raw TCP and SSH.
Is boat SOC 2 compliant?
SOC 2 is in progress. We're open about where we stand: live status at status.ascii.dev and our data retention policy at docs.boat.dev/data-retention.
Try boat
Install the CLI, then run boat new.
7-day free trial