Modal vs OpenAI Containers
Modal gives you sandboxes you create and control from your own code, on a serverless cloud with GPUs and regions around the world. OpenAI Containers are short-lived boxes inside OpenAI's model API, where the model runs Python or shell commands until the box expires.
The companies and products
Modal
Modal is a serverless cloud for AI work: inference, training, batch jobs and sandboxed code, all driven from Python, TypeScript or Go code.
Modal Sandboxes are containers you create from code, run commands in, and then terminate. By default they run under gVisor, a user-space kernel from Google; since October 2026 you can also pick a VM runtime with its own Linux kernel for Docker and FUSE (Battleships tracks that as a separate card, Modal VM Sandboxes). It suits teams that already run models on Modal and want short-lived, scalable code execution next to their GPUs.
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. “19th cheapest of 345” means 18 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 | Modal: 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 | Can't run it | 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 agent that lives on its machine all month hits Modal's 24-hour session limit and OpenAI's 20-minute idle expiry, while bochka ranks 5th with no session cap on paid plans. | 196th of 366, with limits $1,924 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 Running model-written code is what OpenAI Containers are built for, but Modal ranks 19th here with its fast starts and per-second billing, while OpenAI Containers rank 194th because they are billed by memory size with a 5-minute minimum. | 19th cheapest of 345 $181 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 Modal ranks 11th for giving each of your users a sandbox, OpenAI Containers have no inbound access for users to open, and bochka ranks 1st because a stopped sandbox keeps its disk and costs nothing. | 11th cheapest of 361 $811 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 RL rollouts launch many short sandboxes at once, and Modal ranks 5th because that is what it is built for; OpenAI Containers publish no limit on how many can run at once. | 5th cheapest of 360 $19,038 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 | 59th cheapest of 364 $1,244 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: Modal has Docker only on its VM runtime, OpenAI documents no Docker and starts Code Interpreter with no internet, and bochka ranks 4th. | 126th cheapest of 377 $1,793 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 Neither Modal nor OpenAI Containers keeps a root disk between sessions, so a dev box you come back to all month fits bochka, which ranks 18th. | 138th of 368, with limits $23 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 Modal has no desktop built in, OpenAI has a hosted browser inside the Agents API beta, and bochka ranks 6th with a 60fps desktop and computer-use API in every sandbox. | 98th of 369, with limits $183 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 | 177th of 367, with limits $136 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 | 267th of 346, with limits $394 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 | 223rd of 338, with limits $8,795 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 | Can't run it | 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 Modal rents GPUs from T4 to B300 next to its sandboxes, and neither OpenAI Containers nor bochka has GPUs. | 19th cheapest of 98 $1,187 a month | 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 | Modal | OpenAI Containers | bochka |
|---|---|---|---|
| What it is | Serverless sandboxes you create and run commands in from Python, TypeScript or Go | A sandbox tool the model uses inside OpenAI's API | A cloud VM you create, keep, stop and reach from outside |
| Isolation | gVisor by default; a VM runtime with its own kernel is available (Modal VM Sandboxes) | A fully sandboxed virtual machine; hypervisor not named | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Root and Docker | Root; Docker only with the VM runtime | Commands do not run with sudo; no Docker documented | Root, systemd, Docker and /dev/kvm on every machine |
| Machine size | You request CPU and memory in code; the maximum is not published | 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 | Root disk is wiped when the sandbox ends; only Volumes keep files | Data is discarded when the container expires | Disk saved every minute and on stop; a stopped sandbox costs nothing and comes back |
| Longest session | 24 hours (default 5 minutes) | No fixed cap while in use; expires after 20 minutes without use | No cap on paid plans; you set the time to live |
| Snapshots and fork | Filesystem snapshots to boot new sandboxes; memory snapshots in alpha | No snapshots and no fork | Fork a running sandbox without stopping it; named snapshots as templates |
| Custom image | Build images in code or pull any linux/amd64 registry image | Fixed Debian 12 image; you upload files into each container | Named snapshots of a set-up machine; no Dockerfile builds |
| GPUs | T4 to B300; 10 at once on Starter, 50 on Team | None | None |
| Inbound access | Encrypted and raw TCP tunnels, connect tokens, inbound IP allowlist | None; you reach the container only through the API | SSH, HTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP |
| Outbound network | Open by default; block all, IP-range allowlist or domain allowlist (beta) | Code Interpreter and Hosted Shell: off until an admin sets a domain allowlist; Agents API sandboxes open by default | Open internet on every plan; no provider-side allowlist |
| Keeping API keys out of the sandbox | Secrets are environment variables, or you run your own proxy in a sidecar | 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 |
| Coding agents, desktop and computer use | Not built in; examples show how to set up VNC and a harness yourself | Agents API (beta) drives a managed Codex harness, with a hosted browser for computer use | Claude Code, Codex and more preinstalled with an API to drive them, plus a 60fps desktop and Chromium |
| Regions | US, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75x | US or EU processing for Code Interpreter; Agents API data residency in the US only | EU only (Germany, Finland, France) |
Every feature Battleships tracks (43)
| Feature | Modal | OpenAI Containers | bochka |
|---|---|---|---|
| Full VM (own kernel) | No | Yes | Yes |
| Docker inside | No | No | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | No | Yes |
| Systemd | Yes | Not published | Yes |
| Desktop GUI | No | Yes | Yes |
| Browser | No | Yes | Yes |
| Computer-use API | No | Yes | Yes |
| SSH | Yes | No | Yes |
| Persistent disk | Yes | No | Yes |
| Pause/resume | No | No | Yes |
| Automatic snapshots | No | No | Yes |
| Fork/clone | Yes | No | Yes |
| Live fork (no pause) | No | 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 | No | No | No |
| HTTPS preview URLs | Yes | No | Yes |
| Raw TCP inbound | Yes | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | Yes | 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 | Yes | 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) | Not published | No | Yes |
| Audit logs | Yes | Not published | 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 same hpc-sandbox-benchmarks Node.js build-and-test run at 4 vCPU / 8 GB, Modal's default gVisor sandbox finished 12.79 runs per second and bochka finished 26.69, about twice as much work. OpenAI Containers have no comparable measurement: they are not in the benchmark, and OpenAI does not publish the vCPU behind each container size.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Modal measured on: Sandbox (gVisor), request = size, any region. 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 | Modal, 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 | $15 · Starter · with limits | $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 | $178 · Starter · 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,229 · Starter · with limits | $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 | $792 · Team | $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 | $3,193 · Team · with limits | $6,000 · API pay as you go · with limits | $2,000 · $2000/mo · with limits |
Modal: Modal bills by the second for whichever is higher, the CPU and memory you request or what you use, and an idle sandbox pays until it is terminated. Starter is free with $30 of monthly credit and Team is $250 a month with $100 of credit.
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 separately on top. There is no plan fee.
OpenAI Containers: bochka plans start at $20 a month and the whole fee becomes usage credit, spent by the second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.
Limits in those scenarios
On Modal a sandbox lives at most 24 hours and its root disk is wiped when it ends, so the workday, always-on and fleet scenarios keep only files in a Volume, and the 50-agent fleet needs Docker, which the default sandbox lacks. Modal does fit the user-sandboxes scenario on Team. OpenAI Containers fit none of the five scenarios: they have no persistent disk or Docker, Code Interpreter and Hosted Shell start with no internet, and OpenAI does not publish the vCPU per size or how many containers can run at once. On bochka, the 1,000-job burst queues because starts are limited per minute.
| Scenario | Modal | 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 |
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use Modal when
your sandboxes need GPUs, must run outside Europe, or are huge bursts of short jobs you drive from your own code.
- GPUs next to your sandboxes. Useful if your code trains or runs models: Modal rents GPUs from T4 to B300 on the same platform.
- Sandboxes you fully control. Useful if you run your own agent: pick the image, size, region and network rules for each sandbox in code.
- Very large bursts. Useful for RL rollouts and big batches: the Team plan runs up to 5,000 containers at once.
Use OpenAI Containers when
your app already calls OpenAI models and the model only needs to run short pieces of code 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 only reach chosen hosts: Code Interpreter and Hosted Shell start with no outbound access.
- Nothing to run or clean up. Useful for occasional code runs: no plan fee, billing by the minute, and the container expires on its own.
Where bochka fits
If what you are running is a coding agent that works for hours or days, both Modal and OpenAI Containers make you rebuild its machine again and again. bochka gives each agent a full VM with root and Docker that keeps its disk, stops for free and comes back later.
Root and Docker on every machine
Real repos need apt installs and a database in Docker. OpenAI containers run without sudo and document no Docker; on Modal you must switch to the VM runtime, which gives up GPUs.
A disk that stays
A Modal sandbox ends within 24 hours and wipes its root disk unless you save files to a Volume. An OpenAI container is discarded after 20 idle minutes, so your code re-uploads everything each time.
Desktop, ports and agents built in
bochka has a 60fps desktop, HTTPS on 50 ports and coding agents you drive from outside. On Modal you wire up VNC yourself; OpenAI containers accept no inbound connections at all.
Use bochka when your agents work for hours or days and need a real machine they keep: root, Docker, a disk that persists, open internet, ports you can reach and a desktop. Compare it one to one: bochka vs Modal and bochka vs OpenAI Containers.
Questions people ask
Is Modal cheaper than OpenAI Containers?
In our scenarios, yes: one agent running all month costs $178 on Modal against $1,051 on OpenAI, and sandboxes for your users cost $792 against $1,620. OpenAI also bills model tokens on top. bochka comes to $26 and $200 for the same two scenarios.
Which is faster, Modal or OpenAI Containers?
Only Modal has a public measurement: 12.79 runs per second on the Node.js build-and-test benchmark at 4 vCPU / 8 GB. OpenAI does not publish the vCPU behind its container sizes and is not in the benchmark. bochka did 26.69 runs per second in the same run.
Can Modal or OpenAI Containers run Docker?
Modal runs Docker only with its VM runtime, chosen with runtime="vm". OpenAI's hosted shell runs without sudo and documents no Docker. Every bochka sandbox has root, systemd and Docker.
How long can a session last?
A Modal sandbox lasts at most 24 hours, with a default timeout of 5 minutes. An OpenAI container has no fixed cap while it is used, but it expires after 20 minutes without use and its data is discarded. bochka has no session cap on paid plans and keeps the disk when a sandbox stops.
Do Modal or OpenAI Containers have GPUs?
Modal does, from T4 to B300, on its default gVisor runtime. OpenAI Containers and bochka have no GPUs.
Try bochka
Install the CLI, then run bochka new.
Product preview