OpenAI Containers vs Modal VM Sandboxes
OpenAI Containers are a tool inside OpenAI's model API: the model runs Python or shell commands in a box without sudo, and the box is deleted after 20 idle minutes. Modal VM Sandboxes are real Linux VMs with their own kernel, root and Docker, which you start from code and which run for up to 24 hours.
The companies and products
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.
Modal VM Sandboxes
Modal is a serverless cloud for AI work, and VM Sandboxes are the version of its sandboxes that run in a virtual machine with their own Linux kernel.
You create a VM Sandbox from Python, TypeScript or Go code with runtime="vm", run commands in it, and terminate it when the job is done. Modal built the runtime on the Rust-based Cloud Hypervisor, so Docker, FUSE, systemd and nested cgroups work, with the same API, images and prices as its gVisor sandboxes. It became generally available on 1 October 2026 and suits teams that want many short-lived agent machines next to Modal's inference and training.
- Funding
- Over $466M raised
- Generally available
- 1 October 2026; early customers launched over 20 million VMs before that
- Session length
- Default 5 minutes, maximum 24 hours
- Compliance
- SOC 2 on every plan; HIPAA on Enterprise
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. “356th cheapest of 367” means 355 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 | OpenAI Containers: price rank | Modal VM Sandboxes: 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 root, Docker and a repo that stays: Modal gives the first two for up to 24 hours, OpenAI gives none of them, and bochka keeps the disk across stops. | 356th of 367, with limits $17,371 a month | 84th of 367, with limits $759 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An agent that lives on its machine all month fits neither: an OpenAI container must be touched every 20 minutes and a Modal VM ends at 24 hours, while bochka has no session cap on paid plans. | 341st of 366, with limits $13,140 a month | Can't run it | 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 Running short model-written code is what OpenAI Containers are built for, with one tool line in an API call; Modal does not price this use case, and bochka ranks near OpenAI here. | 194th of 345, with limits $6,000 a month | Can't run it | 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 Modal fits sandboxes for your users on the Team plan, while OpenAI's limit on machines running at once is not published; a stopped bochka sandbox keeps its disk for users who come back. | 361st of 361, with limits $3,780 a month | Can't run it | 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 Huge bursts of short rollouts suit Modal, with 5,000 containers at once on Team; OpenAI publishes no container concurrency limit, and bochka queues very large bursts of starts. | 191st of 360, with limits $30,000 a month | 171st of 360, with limits $16,322 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 | 360th of 364, with limits $5,760 a month | Can't run it | 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 needs Docker, root and open internet: Modal VMs have all three, OpenAI containers have none of them documented, and bochka adds /dev/kvm on every plan for emulators. | 345th of 377, with limits $1,728 a month | 188th of 377, with limits $1,064 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB | 362nd of 368, with limits $1,051 a month | Can't run it | 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's Agents API has a hosted browser for computer use, Modal leaves you to install Xvfb and VNC yourself, and bochka ships a 60fps desktop you can embed. | 351st of 369, with limits $5,280 a month | Can't run it | 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 | 328th of 367, with limits $1,440 a month | Can't run it | 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 | 328th of 346, with limits $1,755 a month | Can't run it | 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 | 311th of 338, with limits $35,100 a month | Can't run it | 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 Parallel attack runs need open internet and Docker, which Modal VMs have and OpenAI containers do not; bochka fits this fully. | 308th of 360, with limits $870 a month | 294th of 360, with limits $642 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 | OpenAI Containers | Modal VM Sandboxes | bochka |
|---|---|---|---|
| What it is | A sandbox tool the model uses inside OpenAI's API | A VM you create from Python, TypeScript or Go code on Modal's serverless cloud | A cloud VM you create, keep, stop and reach from outside |
| Isolation | A fully sandboxed virtual machine; hypervisor not named | VM with its own Linux kernel on Cloud Hypervisor | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Root, Docker, systemd | Commands do not run with sudo; no Docker documented | Yes; start dockerd yourself as the entrypoint | Yes, in every sandbox |
| Nested virtualization | Not documented | Team and Enterprise plans only, on request | /dev/kvm on every plan |
| CPU benchmark (4 vCPU / 8 GB) | Not measured; vCPU per size not published | 15.54 runs/s | 26.69 runs/s |
| Longest session | No total cap published, but it expires after 20 minutes without use | 24 hours (default 5 minutes) | No cap on paid plans; you set the time to live |
| Files after the session | Discarded when the container expires and not recoverable | Root disk is gone; only Volumes and filesystem snapshots keep files | Disk saved every minute and on stop; a stopped sandbox costs nothing and comes back |
| Fork and snapshots | None | Filesystem snapshots to boot new sandboxes; memory snapshots in alpha | Fork a running sandbox with its disk; named snapshots as templates |
| Inbound access | None; you reach the container only through the API | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | SSH, HTTPS URLs for up to 50 ports, raw TCP |
| Outbound internet | Code Interpreter and Hosted Shell: off until an admin sets a domain allowlist | Open by default; block all, IP-range allowlist or domain allowlist (beta) | Open internet, no provider-side allowlist |
| Keeping API keys out of the sandbox | domain_secrets: a sidecar adds the real header, the model sees a placeholder | Secrets are environment variables, or you run your own proxy in a sidecar | Credentials proxy for model providers and any HTTPS API; switch to another account when credits run out |
| Coding agents | Agents API (beta) drives a managed Codex harness from outside | Examples only; you install the agent yourself | Claude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API |
| Desktop and computer use | Hosted browser for the Agents API computer_use tool | Not offered; an example shows how to set up Xvfb and VNC yourself | 60fps desktop, Chromium and computer-use API, embeddable stream |
| Regions | US or EU processing for Code Interpreter; Agents API US only | US, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75x | EU only: Germany, Finland, France |
Every feature Battleships tracks (43)
| Feature | OpenAI Containers | Modal VM Sandboxes | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | No | Yes | Yes |
| Nested virtualization | No | Yes | Yes |
| Root | No | Yes | Yes |
| Systemd | Not published | Yes | Yes |
| Desktop GUI | Yes | No | Yes |
| Browser | Yes | No | Yes |
| Computer-use API | Yes | No | Yes |
| SSH | No | Yes | Yes |
| Persistent disk | No | Yes | Yes |
| Pause/resume | No | No | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | No | Yes | Yes |
| Live fork (no pause) | No | Yes | Yes |
| Memory fork | No | Yes | No |
| Custom image (Docker or snapshot) | No | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | Yes | No |
| Wake on request | No | No | No |
| HTTPS preview URLs | No | Yes | Yes |
| Raw TCP inbound | No | Yes | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | Yes | No |
| Secret proxy | Yes | No | Yes |
| Secret proxy for any API | Yes | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | Yes | No | Yes |
| MCP server | No | No | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | Yes | No | 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 | Not published | Yes |
| Audit logs | Not published | Yes | No |
| SSO | Yes | 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
In the hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB, run on 29 September 2026, Modal's VM runtime did 15.54 runs per second and bochka did 26.69. 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. Modal VM Sandboxes measured on: VM Sandbox, request = size. 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 | OpenAI Containers, a month | Modal VM Sandboxes, 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 | $228 · API pay as you go · with limits | $15 · Starter · with limits | $20 · $20/mo |
| One agent that never stops 4 vCPU / 8 GB, 50 GB disk, running 24/7 all month | $1,051 · API pay as you go · with limits | $178 · Starter · 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 | $11,405 · API pay as you go · with limits | $2,229 · Starter · 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,620 · API pay as you go · with limits | $792 · Team | $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 | $6,000 · API pay as you go · with limits | $3,193 · Team · with limits | $2,000 · $2000/mo · with limits |
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 because vCPU is not published.
Modal VM Sandboxes: Modal bills by the second for the higher of the CPU and memory you request or what you use, until the sandbox ends. Starter is free with $30 of monthly credit, Team is $250 a month with $100 of credit, and pinning a region multiplies the price by 1.15x to 1.75x.
Modal VM Sandboxes: bochka charges one hourly rate per machine size, by the second, only while the sandbox runs. Plans start at $20 a month and the whole fee becomes usage credit; a stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
OpenAI Containers fit none of the five scenarios: they have no persistent disk and no Docker, Code Interpreter and Hosted Shell start with no internet, and how many can run at once is not published. Modal VM Sandboxes fit the user sandboxes on Team, but the workday, always-on and fleet scenarios keep files only in Volumes, and every session ends at 24 hours. For the 1,000-job burst, Modal's small CPU request on Team uses shared extra CPU, and bochka's $2,000 plan queues the starts.
| Scenario | OpenAI Containers | Modal VM Sandboxes | 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 | None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
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 if code must reach only chosen hosts: Code Interpreter and Hosted Shell start with no outbound access at all.
- Nothing to run or clean up. Useful for short jobs: OpenAI creates the container, bills it by the minute with your tokens, and deletes it when idle.
Use Modal VM Sandboxes when
you need a real VM with Docker for jobs that finish within a day, huge bursts of them, regions outside Europe, or strict outbound rules.
- A real VM with root and Docker. Useful if the agent installs packages or runs containers: each sandbox has its own Linux kernel, root, Docker and systemd.
- Very large bursts. Useful for huge batches of short jobs: Modal runs 5,000 containers at once on the Team plan.
- Regions and one platform. Useful if you need the US or Asia-Pacific, or already serve models on Modal and want sandboxes on the same account.
Where bochka fits
If your agent works for hours or days on the same machine, both options cut it off: OpenAI deletes an idle container after 20 minutes and Modal ends a VM within 24 hours. bochka gives each agent a full VM that keeps its disk, stops for free and has a desktop and coding agents built in.
A disk that stays, with no cutoff
An OpenAI container's files are discarded after 20 idle minutes, and a Modal VM loses its root disk when it ends at 24 hours. On Modal you can write code to save Volumes or snapshots; on bochka the disk is saved every minute.
Desktop, browser and agents ready
OpenAI offers a browser and a Codex harness only through its Agents API beta, and Modal gives you the kernel but not VNC, a browser or an agent. bochka ships a 60fps desktop, Chromium and Claude Code, Codex and more.
Root and a faster CPU
OpenAI commands run without sudo and its vCPU per size is not published. Modal has root, but did 15.54 runs per second to bochka's 26.69 at 4 vCPU / 8 GB, so every install, build and test waits longer.
Use bochka when your agents work for hours or days on a machine they come back to: root, Docker, a desktop and coding agents, on a faster VM that keeps its disk. Compare it one to one: bochka vs OpenAI Containers and bochka vs Modal VM Sandboxes.
Questions people ask
Is OpenAI Containers cheaper than Modal VM Sandboxes?
No, in our scenarios Modal costs less: one agent running all month is $1,051 on OpenAI against $178 on Modal, and sandboxes for your users are $1,620 against $792. OpenAI also bills model tokens on top. On bochka the same always-on agent is $26 a month.
Which is faster?
Modal's VM runtime did 15.54 runs per second on the hpc-sandbox-benchmarks CPU test at 4 vCPU / 8 GB. OpenAI Containers were not measured, and OpenAI does not publish their vCPU. bochka did 26.69 runs per second in the same run.
Can OpenAI Containers run Docker?
OpenAI's docs say hosted shell commands do not run with sudo, and no Docker support is documented. Modal VM Sandboxes run Docker if you start dockerd yourself, and bochka has root, systemd and Docker in every sandbox.
How long can each one run?
An OpenAI container expires after 20 minutes without use and its data is discarded. A Modal VM Sandbox runs 5 minutes by default and 24 hours at most. A bochka sandbox has no session cap on paid plans and keeps its disk when it stops.
Can I open a web app running inside each one?
Not in an OpenAI container: it has no ports or URLs and you reach it only through the API. Modal gives encrypted and raw TCP tunnels, and bochka gives HTTPS URLs for up to 50 ports, raw TCP and SSH.
Try bochka
Install the CLI, then run bochka new.
Product preview
More comparisons
- bochka vs OpenAI Containers
- bochka vs Modal VM Sandboxes
- E2B vs OpenAI Containers
- Daytona vs OpenAI Containers
- Modal vs OpenAI Containers
- Vercel Sandbox vs OpenAI Containers
- Cloudflare Sandbox vs OpenAI Containers
- Blaxel vs OpenAI Containers
- Runloop vs OpenAI Containers
- Tensorlake vs OpenAI Containers
- Morph Cloud vs OpenAI Containers
- CodeSandbox SDK vs OpenAI Containers