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.

Self-hosting
Not offered

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 workloadCodeSandbox SDK: price rankOpenAI Containers: price rankbochka: 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 itCan't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureCodeSandbox SDKOpenAI Containersbochka
What it isSandboxed development VMs you start and drive from a TypeScript SDKA sandbox tool the model uses inside OpenAI's APIA cloud VM you create, keep, stop and reach from outside
IsolationFirecracker microVM with its own kernelA fully sandboxed virtual machine; hypervisor not namedFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Root and DockerDocker and root; built from any DockerfileCommands do not run with sudo; no Docker documentedRoot, systemd and Docker on every machine
Nested virtualizationNot documentedNot documentedYes, /dev/kvm for Android emulators and VMs
Machine size2 to 16 cores self-serve (up to 32 GB on Scale); up to 64 cores and 128 GB on Enterprise1, 4, 16 or 64 GB of memory; vCPU not published4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB
Files after the sessionDisk kept; hibernates with a memory snapshot, processes still running on resumeData is discarded when the container expiresDisk saved every minute and on stop; a stopped sandbox costs nothing and comes back
LifetimeNo hard cap; hibernates after an idle timeout of up to one dayExpires after 20 minutes without useNo session cap on paid plans; you set the time to live
ForkFork a hibernated sandbox from its snapshot, or a running one sharing its memoryNo forkFork a running sandbox with its disk
Custom imageTemplates from any DockerfileFixed Debian 12 image; you upload files or skills into each containerNamed snapshots of a set-up machine, reused as templates
Inbound accessHTTPS host per port that can wake the sandbox; no SSH, raw TCP or public IPNone; you reach the container only through the APISSH, HTTPS URLs for up to 50 ports, raw TCP
Outbound internetOutbound access with no egress allowlistCode Interpreter and Hosted Shell: off until an admin sets an org domain allowlistOpen internet on every plan
Keeping API keys out of the sandboxSecrets passed in as environment variablesdomain_secrets: a sidecar adds the real header for approved domainsCredentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Coding agentsRun your own agent through the command APIAgents API (beta) drives a managed Codex harness from outsideClaude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API
Desktop and computer useNo desktop; a headless Chromium templateHosted browser for the Agents API computer_use tool60fps desktop and Chromium, computer use, embeddable stream
Every feature Battleships tracks (43)
FeatureCodeSandbox SDKOpenAI Containersbochka
Full VM (own kernel)YesYesYes
Docker insideYesNoYes
Nested virtualizationNoNoYes
RootYesNoYes
SystemdNot publishedNot publishedYes
Desktop GUINoYesYes
BrowserNoYesYes
Computer-use APINoYesYes
SSHNoNoYes
Persistent diskYesNoYes
Pause/resumeYesNoYes
Automatic snapshotsYesNoYes
Fork/cloneYesNoYes
Live fork (no pause)YesNoYes
Memory forkYesNoNo
Custom image (Docker or snapshot)YesNoYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestYesNoNo
HTTPS preview URLsYesNoYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistNoYesNo
Secret proxyNoYesYes
Secret proxy for any APINoYesYes
Preinstalled agentsNoNoYes
Agent harness APINoYesYes
MCP serverNoNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoYesNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)NoNoYes
Audit logsNot publishedNot publishedNo
SSOYesYesNo
SOC 2YesYesNo
HIPAANoYesNo
EU data residencyNoYesYes
Zero data retentionNot publishedNot publishedYes

Performance

CodeSandbox SDKNot measured
OpenAI ContainersNot measured
bochka26.69 runs/s

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.

ScenarioCodeSandbox SDK, a monthOpenAI Containers, a monthbochka, 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.

ScenarioCodeSandbox SDKOpenAI Containersbochka
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • no open internet: sandboxes reach only an allowlist (domains your org admin adds to the allow list)
  • missing persistent disk
  • machine size not published
  • different kind of product: code interpreter
None that bite
One agent that never stops
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • no open internet: sandboxes reach only an allowlist (domains your org admin adds to the allow list)
  • missing persistent disk
  • machine size not published
  • different kind of product: code interpreter
None that bite
50 agents in parallel
  • egress price not published
  • no open internet: sandboxes reach only an allowlist (domains your org admin adds to the allow list)
  • missing persistent disk, Docker inside
  • machine size not published
  • different kind of product: code interpreter
None that bite
Sandboxes for your users
  • Scale: max 250 concurrent
  • egress price not published
  • no open internet: sandboxes reach only an allowlist (domains your org admin adds to the allow list)
  • machine size not published
  • different kind of product: code interpreter
  • not confirmed: how many machines can run at once (you need 300; the typical published limit is 50)
None that bite
1,000 short jobs at once
  • Scale: max 250 concurrent
  • egress price not published
  • no open internet: sandboxes reach only an allowlist (domains your org admin adds to the allow list)
  • machine size not published
  • different kind of product: code interpreter
  • not confirmed: how many machines can run at once (you need 1,000; the typical published limit is 50)
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

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 product preview · Pricing, benchmarks and commands are illustrative. Sandbox provisioning is not connected.