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, and they expire after 20 minutes without use.
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 now call it the legacy 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 bochka: 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. “46th cheapest of 345” means 45 of the other 344 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 | bochka: 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 and OpenAI Containers do not; bochka adds SSH, /dev/kvm and preinstalled coding agents. | 178th of 367, with limits $1,939 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 fits CodeSandbox SDK or bochka, while an OpenAI container is deleted after 20 idle minutes. | 215th of 366, with limits $2,478 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 suit short code runs: OpenAI Containers run the model's code inside the API call, and CodeSandbox SDK wakes a hibernated VM with its memory on the next request. | 46th cheapest of 345 $642 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 CodeSandbox SDK gives each user an HTTPS host that wakes their sandbox, OpenAI containers take no inbound connections, and bochka adds SSH, raw TCP and a desktop. | 140th of 361, with limits $1,707 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 CodeSandbox SDK's memory forks let many rollouts branch from one running state, which OpenAI Containers cannot do. | 348th of 360, with limits $3,861 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 | 64th cheapest of 364 $1,335 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 and open internet, which CodeSandbox SDK has and OpenAI's Code Interpreter and Hosted Shell containers do not; bochka also has /dev/kvm for Android builds. | 92nd cheapest of 377 $860 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 keep all month needs a persistent disk, which CodeSandbox SDK and bochka have and OpenAI containers do not; only bochka adds SSH. | 310th of 368, with limits $240 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 OpenAI has a hosted browser for computer use in the Agents API beta, CodeSandbox SDK has no desktop, and bochka streams a full 60fps desktop. | 206th of 369, with limits $691 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 | 251st of 367, with limits $443 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 | 281st of 346, with limits $508 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 | 193rd of 338, with limits $7,390 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 | 240th of 360, with limits $326 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 | CodeSandbox SDK | OpenAI Containers | bochka |
|---|---|---|---|
| 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 dedicated AMD Ryzen 9 9950X hosts |
| Root and Docker | Docker and root; built from any Dockerfile | Commands do not run with sudo; no Docker documented | Root, systemd and Docker on every machine |
| Nested virtualization | Not documented | Not documented | Yes, /dev/kvm 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 | 4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB |
| Files after the session | Disk kept; hibernates with a memory snapshot, processes still running on resume | Data is discarded when the container expires | Disk saved every minute and on stop; a stopped sandbox costs nothing and comes back |
| Lifetime | No hard cap; hibernates after an idle timeout of up to one day | Expires after 20 minutes without use | No session cap on paid plans; you set the time to live |
| Fork | Fork a hibernated sandbox from its snapshot, or a running one sharing its memory | No fork | Fork a running sandbox with its disk |
| Custom image | Templates from any Dockerfile | 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 host per port that can wake the sandbox; no SSH, raw TCP or public IP | None; you reach the container only through the API | SSH, HTTPS URLs for up to 50 ports, raw TCP |
| Outbound internet | Outbound access with no egress allowlist | Code Interpreter and Hosted Shell: off until an admin sets an org domain allowlist | Open internet on every plan |
| Keeping API keys out of the sandbox | Secrets passed in as environment variables | domain_secrets: a sidecar adds the real header for approved domains | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Coding agents | Run your own agent through the command API | Agents API (beta) drives a managed Codex harness from outside | Claude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API |
| Desktop and computer use | No desktop; a headless Chromium template | Hosted browser for the Agents API computer_use tool | 60fps desktop and Chromium, computer use, embeddable stream |
Every feature Battleships tracks (43)
| Feature | CodeSandbox SDK | OpenAI Containers | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | No | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | No | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | No | Yes | Yes |
| Browser | No | Yes | Yes |
| Computer-use API | No | Yes | Yes |
| SSH | No | 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 | No | Yes | No |
| Secret proxy | No | Yes | Yes |
| Secret proxy for any API | No | Yes | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | Yes | Yes |
| MCP server | No | No | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | Yes | No |
| BYOC | No | No | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | Not published | Yes |
| Usage per sandbox (API) | No | No | Yes |
| Audit logs | Not published | Not published | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | No | Yes | No |
| EU data residency | No | Yes | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable CPU measurement for CodeSandbox SDK or OpenAI Containers, and OpenAI does not publish how many vCPU each container size gets. bochka did 26.69 runs per second on the StarSling hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB, on dedicated AMD Ryzen 9 9950X hosts.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. CodeSandbox SDK and OpenAI Containers have 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 | CodeSandbox SDK, a month | OpenAI Containers, a month | bochka, 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 | $2,000 · $2000/mo · with limits |
CodeSandbox SDK: You buy VM credits and each size burns a fixed number per hour, billed per started minute while the VM runs, including idle time before it hibernates. The Scale plan adds a $170 monthly platform fee that is not usage credit, and a hibernated VM costs nothing.
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.
OpenAI Containers: Plans start at $20 a month, and all of it becomes usage credit spent per second on running sandboxes. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
OpenAI Containers do not fit any of the five scenarios: no persistent disk, no Docker, no internet in Code Interpreter and Hosted Shell until an admin allows domains, and no published vCPU. 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. bochka fits all but the burst, where even the $2,000 plan queues starts.
| Scenario | CodeSandbox SDK | OpenAI Containers | bochka |
|---|---|---|---|
| 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 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 are fine building on what Together now calls its legacy SDK.
- 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. Code Interpreter can process data in the United States or Europe, and the Agents API can drive a sandbox you host.
Where bochka fits
If your agents do real work for hours, installing packages, running Docker and emulators, and serving apps people open, look at bochka. CodeSandbox SDK gives you a VM but no SSH, desktop or agent harness, and OpenAI Containers give the model a short-lived box with no root and no disk that stays.
A whole machine with root and KVM
OpenAI containers run commands without sudo and document no Docker, so the agent stops at the first apt install. CodeSandbox SDK has Docker but no SSH or documented /dev/kvm, so Android emulator builds cannot start.
Reachable from outside
An app an agent builds in an OpenAI container cannot be opened by anyone, since there are no ports at all. CodeSandbox SDK hosts are HTTPS only, so databases, game servers or SSH tunnels stay out of reach; bochka adds SSH and raw TCP.
Agents, desktop and keys built in
On CodeSandbox SDK you build the agent harness and browser yourself and pass keys in as environment variables the agent can read. bochka ships Claude Code, Codex and a 60fps desktop, and keeps real keys outside in a credentials proxy.
Use bochka when your agents need a real machine they keep: root, Docker, /dev/kvm, SSH, ports other people can reach, a desktop, and coding agents and a credentials proxy already set up. Compare it one to one: bochka vs CodeSandbox SDK and bochka vs OpenAI Containers.
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 vs $1,051. OpenAI also bills model tokens on top, and bochka comes to $20 and $26 a month for the same two.
Which is faster, CodeSandbox SDK or OpenAI Containers?
Neither has a comparable CPU measurement, and OpenAI does not publish the vCPU behind each container size. bochka did 26.69 runs per second on the hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB.
Can CodeSandbox SDK and OpenAI Containers run Docker?
CodeSandbox SDK runs Docker as root, and its templates can be built from any Dockerfile. OpenAI documents no Docker, and hosted shell commands do not run with sudo. bochka 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 20 minutes without use, and its data is discarded. bochka saves the disk every minute and when the sandbox stops.
Can I SSH into either one?
No. CodeSandbox SDK connects through its SDK with terminals, commands and files, and OpenAI containers are reached only through the API. Every bochka sandbox has SSH as well as an exec and files API.
Is bochka SOC 2 compliant?
SOC 2 is in progress. We're open about where we stand: live status at status.bochka.xyz and our data retention policy at docs.bochka.xyz/data-retention.
Try bochka
Install the CLI, then run bochka new.
Product preview
More comparisons
- bochka vs CodeSandbox SDK
- bochka 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