CodeSandbox SDK vs OpenAI Containers
CodeSandbox SDK starts Firecracker VMs you drive from your own code, with root, Docker and a disk that stays, and it hibernates them with their memory. OpenAI Containers are short-lived boxes inside OpenAI's model API where the model runs code. By default they expire after 20 minutes without use, and their files go with them.
The companies and products
CodeSandbox SDK
CodeSandbox SDK is an API from CodeSandbox, now a Together AI company, that starts sandboxed development VMs on the same infrastructure as the CodeSandbox editor.
Each sandbox is a Firecracker microVM built from a template or any Dockerfile. When it goes idle, it hibernates with a memory snapshot, and it resumes or forks from that snapshot in seconds. You drive it from a TypeScript SDK through terminals, commands, files and HTTPS hosts. Together's docs call it the deprecated offering and point new users to its successor, the together-sandbox SDK.
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 a Responses call makes one. The model runs Python or shell commands in it on a fixed Debian 12 image without sudo. By default the container expires after 20 minutes without use; the create call can set a different idle time. 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. “32nd cheapest of 365” means 31 of the other 364 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 | CodeSandbox SDK: 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 Docker, root and a disk that stays, which CodeSandbox SDK has. Hosted OpenAI containers run without sudo, document no Docker and discard files when they expire; you can connect the Agents API to a sandbox you host. boat adds SSH, /dev/kvm and installed coding agents. | 32nd cheapest of 365 $3,731 a month | 357th of 365, with limits $17,371 a month | 5th cheapest of 365 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An assistant that lives on its machine all month fits CodeSandbox SDK or boat. An OpenAI container expires after its idle time (20 minutes by default, set with expires_after), and its files go with it. | 50th cheapest of 361 $4,811 a month | 344th of 361, with limits $13,140 a month | 6th cheapest of 361 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month Both suit short code runs. OpenAI Containers run the model's code inside the API call, with no machine to manage. CodeSandbox SDK wakes a hibernated VM with its memory on the next request. | 54th cheapest of 336 $642 a month | 198th of 336, with limits $6,000 a month | 189th of 336, 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 CodeSandbox SDK gives each user an HTTPS host that wakes their sandbox. OpenAI documents no inbound ports for hosted containers. boat adds SSH and raw ports on the sandbox's IPv6 address. | 140th of 349, with limits $1,707 a month | 349th of 349, with limits $3,780 a month | 3rd cheapest of 349 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month CodeSandbox SDK's memory forks let many rollouts branch from one running state. OpenAI documents no fork call; you create a new container and upload the same files. | 341st of 349, with limits $3,861 a month | 195th of 349, with limits $30,000 a month | 39th of 349, with limits $2,000 a month |
| Agent evals 250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month | 77th cheapest of 359 $1,335 a month | 355th of 359, with limits $5,760 a month | 10th cheapest of 359 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month CI jobs need Docker and open internet, which CodeSandbox SDK has. OpenAI documents no Docker, and Code Interpreter and Hosted Shell containers have no outbound access until an admin allows domains. boat also has /dev/kvm for Android builds. | 96th cheapest of 374 $860 a month | 347th of 374, with limits $1,728 a month | 2nd cheapest of 374 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB A dev box you keep all month needs a persistent disk, which CodeSandbox SDK and boat have and hosted OpenAI containers do not. boat adds SSH. | 316th of 371, with limits $240 a month | 365th of 371, with limits $1,051 a month | 19th cheapest of 371 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month OpenAI has a hosted browser for computer use in the Agents API beta. On CodeSandbox SDK you add a VNC desktop to your own Dockerfile. boat streams a full 60 fps desktop with Chrome. | 54th cheapest of 367 $1,236 a month | 353rd of 367, with limits $5,280 a month | 7th cheapest of 367 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month | 125th of 356, with limits $741 a month | 335th of 356, with limits $1,440 a month | 7th cheapest of 356 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 119th cheapest of 343 $871 a month | 334th of 343, with limits $1,755 a month | 6th cheapest of 343 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 194th of 327, with limits $7,390 a month | 307th of 327, with limits $35,100 a month | 73rd of 327, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 29th cheapest of 351 $505 a month | 310th of 351, with limits $870 a month | 3rd cheapest of 351 $200 a month |
| GPU eval jobs 10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month | Not ranked: misses a requirement | Not ranked: misses a requirement | Not ranked: misses a requirement |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Not ranked: misses a requirement | Not ranked: misses a requirement | Not ranked: misses a requirement |
Key features
| Feature | CodeSandbox SDK | OpenAI Containers | boat |
|---|---|---|---|
| What it is | Sandboxed development VMs you start and drive from a TypeScript SDK | 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 hosts dedicated to boat (AMD Ryzen 7 9700X and Ryzen 9 9950X); vCPUs are shared |
| Root and Docker | Docker and root; templates build from any Dockerfile | Commands do not run with sudo; Docker is not documented; you can connect the Agents API to a self-hosted sandbox | Root, systemd and Docker on every sandbox |
| Nested virtualization | Not documented | Not documented | Yes, /dev/kvm on every sandbox for Android emulators and VMs |
| Machine size | 2 to 16 cores self-serve (up to 32 GB on Scale); up to 64 cores and 128 GB on Enterprise | 1, 4, 16 or 64 GB of memory; vCPU not published. Agents API sandboxes: up to 4 vCPU / 16 GB | 4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB (xlarge needs the $100 plan) |
| Files after the session | Disk kept; hibernates with a memory snapshot, processes still running on resume | Data is discarded when the container expires; Agents API publishes files in /workspace/outputs as artifacts | Disk saved every minute and at each stop, kept at least 14 days; memory is not saved |
| Lifetime | No hard cap; hibernates after an idle timeout (30 minutes by default on paid plans, up to 1 day) and bills until then | Expires after 20 minutes without use by default; expires_after sets another idle time, no maximum published | Auto-stop defaults to 1 hour; set up to 30 days, or turn it off on a paid plan for no session cap |
| Fork | Fork a hibernated sandbox from its memory snapshot, or a running one that shares memory with its parent | No fork call documented; you create a new container and upload the same files | Fork a running sandbox from its last 1-minute disk snapshot; memory is not copied |
| Custom image | Templates from any Dockerfile | Fixed Debian 12 image; you upload files or skills into each container | Saved snapshots of a set-up sandbox, reused as templates; you cannot boot your own Docker image |
| Inbound access | HTTPS host per port that can wake the sandbox, public by default; SSH and raw TCP are not documented | No inbound ports documented for hosted containers; you reach them through the API | SSH, up to 50 HTTPS URLs token-gated by default, raw ports on the public IPv6 address (some sandboxes also have IPv4) |
| Outbound internet | Open; no egress allowlist documented | Code Interpreter and Hosted Shell: off until an admin sets an org domain allowlist. Agents API sandboxes: 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 passed in as environment variables; no credentials proxy documented | domain_secrets: a sidecar adds the real header for approved domains, and the model sees a placeholder | Optional credentials proxy ($1 a day while on, plus $1 per 1,000 requests) for model providers and custom HTTPS APIs |
| Coding agents | You install your own agent in the template and run it through the commands API | Agents API (beta) drives a managed Codex harness from outside, with steering, events and webhooks | Seven harnesses installed, including Claude Code and Codex, with a prompt, steer and events API |
| Desktop and computer use | No built-in desktop; a headless Chromium template, and you can install a VNC desktop in your own Dockerfile | Hosted browser for the Agents API computer_use tool | Built-in desktop and Chrome streamed at 1920x1080, 60 fps, with computer-use tools and an embeddable stream |
Every feature Battleships tracks (43)
| Feature | CodeSandbox SDK | OpenAI Containers | boat |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | No documented way | Yes |
| Nested virtualization | No documented way | No documented way | Yes |
| Root | Yes | No documented way | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | With your own setup | Yes | Yes |
| Browser | With your own setup | Yes | Yes |
| Computer-use API | No documented way | Yes | Yes |
| SSH | No documented way | No documented way | Yes |
| Persistent disk | Yes | No documented way | Yes |
| Pause/resume | Yes | No documented way | Yes |
| Automatic snapshots | Yes | No documented way | Yes |
| Fork/clone | Yes | No documented way | Yes |
| Live fork (no pause) | Yes | No documented way | Yes |
| Memory fork | Yes | No documented way | No documented way |
| Custom image (Docker or snapshot) | Yes | No documented way | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No documented way |
| Wake on request | Yes | No documented way | No documented way |
| HTTPS preview URLs | Yes | No documented way | Yes |
| Raw TCP inbound | No documented way | No documented way | Yes |
| Public IPv4 | No documented way | No documented way | No documented way |
| Egress allowlist | No documented way | Yes | No documented way |
| Secret proxy | No documented way | Yes | Yes |
| Secret proxy for any API | No documented way | Yes | Yes |
| Preinstalled agents | No documented way | No documented way | Yes |
| Agent harness API | No documented way | Yes | Yes |
| MCP server | No documented way | No documented way | No documented way |
| GPU | No documented way | No documented way | No documented way |
| Windows | No documented way | No documented way | No documented way |
| Arm64 | No documented way | No documented way | No documented way |
| Self-hosting | No documented way | Yes | No documented way |
| BYOC | No documented way | No documented way | No documented way |
| Open source | No documented way | No documented way | No documented way |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | Not published | Yes |
| Usage per sandbox (API) | No documented way | No documented way | Yes |
| Audit logs | Not published | Not published | No documented way |
| SSO | Yes | Yes | No documented way |
| SOC 2 | Yes | Yes | No documented way |
| HIPAA | No documented way | Yes | No documented way |
| EU data residency | No documented way | Yes | No documented way |
| Zero data retention | Not published | Not published | Yes |
Performance
Neither CodeSandbox SDK nor OpenAI Containers is in the public CPU benchmarks we use, so we cannot say which is faster. OpenAI does not publish the vCPU behind each container size. In StarSling's run of 3 October 2026 (run 37073680030), boat did 28.06 runs/s on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, second of 15. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. For start time, ComputeSDK measured CodeSandbox SDK at its default size: 11.76 s median with 100 starts at once (6 November 2026).
V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. CodeSandbox SDK and OpenAI Containers are not in the public benchmarks we use, so we cannot say which is faster.
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. Start limits, per-start fees and plan minimums are in the price, boat's included.
| Scenario | CodeSandbox SDK, 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 | $193 · Scale | $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 | $341 · Scale | $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,500 · Scale | $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 | $815 · Scale · with limits | $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 | $1,632 · Scale · with limits | $6,000 · API pay as you go · with limits | $8,800 · $2000/mo · with limits |
CodeSandbox SDK: You buy VM credits at $0.01486 each, and each size burns a fixed number per hour: 20 for a 4 vCPU / 8 GB VM, about $0.30. Billing is per started minute while the VM runs, including idle time before it hibernates. A hibernated VM has no VM charge. Larger teams pay a $170 monthly Scale platform fee, which is not usage credit. Prices as checked on 28 September 2026; CodeSandbox's pricing pages blocked our automated check on 8 November 2026.
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 ($1.44 an hour) for 8 GB needs, because OpenAI does not publish the vCPU per size.
OpenAI Containers: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. A 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. The $20 plan includes 200 starts a day; each extra start costs $0.03 to $0.07. A stopped sandbox has no compute charge and keeps its disk for at least 14 days. Saved snapshots above the included count and the credentials proxy, while it is on, still charge.
Limits in those scenarios
OpenAI Containers do not fit any of the five scenarios as written: hosted containers discard files when they expire, document no Docker or root, and do not publish vCPU. Code Interpreter and Hosted Shell containers have no outbound access until an admin allows domains. CodeSandbox SDK fits the three agent scenarios, but its Scale plan allows 250 VMs at once, so the 300 user sandboxes and the 1,000-job burst need Enterprise. Each CodeSandbox VM has a 20 GB disk, and the price for more disk and for egress is not published. boat does not fit the 1,000-job burst: the $2,000 plan includes 90 starts a minute and 2,400 a day, extra starts are paid, and starts above 270 a minute fail with 429. boat never queues a start.
| Scenario | CodeSandbox SDK | OpenAI Containers | boat |
|---|---|---|---|
| One coding agent, workdays |
|
| None for this scenario |
| One agent that never stops |
|
| None for this scenario |
| 50 agents in parallel |
|
| None for this scenario |
| Sandboxes for your users |
|
| None for this scenario |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use CodeSandbox SDK when
you want VMs you drive from your own code that keep their disk, hibernate with their memory and wake on the next HTTP request, and you accept that Together calls this SDK deprecated.
- A machine that keeps its state. Good for agents that come back later: the VM keeps its disk, runs Docker as root and hibernates with its memory.
- Wake on request. Useful for previews that sleep between visits: an HTTP request to a host wakes the VM with its processes still running.
- Forks that share memory. Good for branching many runs, such as rollouts or test variants, from one warm running state.
Use OpenAI Containers when
your app already calls OpenAI models and the model only needs to run short pieces of code or shell commands on files you give it.
- Built into the model call. Useful if your app already calls OpenAI models: one tool line in a request gives the model a place to run code.
- Locked-down network by default. Useful when code must only reach chosen hosts: Code Interpreter and Hosted Shell have no outbound access until an admin allows domains.
- US or EU processing, and your own compute. Code Interpreter can process data in the United States or Europe, and the Agents API can drive a sandbox you host.
Where boat fits
If your agents do real work for hours, installing packages, running Docker and emulators, and serving apps people open, look at boat. Each agent gets a full VM with SSH, a desktop and coding agents installed, and its disk is saved every minute. boat needs a plan from $20 a month and has no GPU.
A whole machine with root and KVM
Hosted OpenAI containers run commands without sudo and document no Docker. CodeSandbox SDK has Docker but documents no SSH or /dev/kvm, so Android emulator builds are not documented there. boat has root, systemd, Docker, SSH and /dev/kvm.
Reachable from outside
OpenAI documents no inbound ports for hosted containers, so nobody can open an app an agent builds there. CodeSandbox SDK hosts are HTTPS only. boat adds SSH and raw ports on the sandbox's IPv6 address; the IP changes at each resume.
Agents and desktop set up
On CodeSandbox SDK you build the agent harness and desktop yourself and pass keys as environment variables. OpenAI's Agents API drives its own Codex harness. boat installs seven agents and a 60 fps desktop. Its optional paid credentials proxy keeps model keys outside.
Use boat when your agents need a real machine they keep: root, Docker, /dev/kvm, SSH, ports other people can reach, a desktop, and seven coding agents installed. Compare it one to one: boat vs CodeSandbox SDK and boat vs OpenAI Containers.
boat's own limits
- Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
- Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
- A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
- Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
- boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
- Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
- Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
- Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source
Questions people ask
Is CodeSandbox SDK cheaper than OpenAI Containers?
In the scenarios on this page, yes. One coding agent on workdays comes to $193 a month on CodeSandbox SDK against $228 on OpenAI, and one agent all month to $341 against $1,051. OpenAI bills model tokens on top. boat comes to $20 and $26 a month for the same two. For a few short code runs a month, OpenAI, with no plan fee, can cost less than either.
Which is faster, CodeSandbox SDK or OpenAI Containers?
Neither is in the public CPU benchmarks we use, and OpenAI does not publish the vCPU behind each container size. In StarSling's run of 3 October 2026, boat did 28.06 runs/s at 4 vCPU / 8 GB, on an AMD Ryzen 9 9950X host.
Can CodeSandbox SDK and OpenAI Containers run Docker?
CodeSandbox SDK runs Docker as root, and its templates build from any Dockerfile. OpenAI documents no Docker, and hosted shell commands do not run with sudo; you can connect the Agents API to a sandbox you host. boat gives you root, systemd, Docker and /dev/kvm.
Do files survive after a session?
On CodeSandbox SDK, yes: the VM keeps its disk and can hibernate with its memory. An OpenAI container expires after its idle time, 20 minutes by default, and its data is discarded. boat saves the disk every minute and at each stop, and keeps it for at least 14 days after a stop.
Can I SSH into either one?
Neither documents SSH. CodeSandbox SDK connects through its SDK with terminals, commands and files, and hosted OpenAI containers are reached only through the API. Every boat sandbox has SSH as well as an exec and files API.
Is boat SOC 2 compliant?
Not yet. SOC 2 is in progress, and there is no SOC 2 report today. OpenAI's API Platform is audited for SOC 2 Type 2, and CodeSandbox lists SOC 2 Type II on its Enterprise plan. Live status is 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
More comparisons
- boat vs CodeSandbox SDK
- boat vs OpenAI Containers
- E2B vs CodeSandbox SDK
- Daytona vs CodeSandbox SDK
- Modal vs CodeSandbox SDK
- Vercel Sandbox vs CodeSandbox SDK
- Cloudflare Sandbox vs CodeSandbox SDK
- Blaxel vs CodeSandbox SDK
- Runloop vs CodeSandbox SDK
- Tensorlake vs CodeSandbox SDK
- Morph Cloud vs CodeSandbox SDK
- CodeSandbox SDK vs Northflank