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 boat: 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.

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 workloadOpenAI Containers: price rankModal VM Sandboxes: price rankboat: 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 boat 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 boat has no session cap on paid plans.
341st of 366, with limits
$13,140 a month
Can't run it5th 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 boat ranks near OpenAI here.
194th of 345, with limits
$6,000 a month
Can't run it186th 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 boat sandbox keeps its disk for users who come back.
361st of 361, with limits
$3,780 a month
Can't run itCheapest 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 boat 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 it10th 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 boat 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 it18th 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 boat ships a 60fps desktop you can embed.
351st of 369, with limits
$5,280 a month
Can't run it6th 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 it7th 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 it6th 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 it71st 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; boat 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 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

FeatureOpenAI ContainersModal VM Sandboxesboat
What it isA sandbox tool the model uses inside OpenAI's APIA VM you create from Python, TypeScript or Go code on Modal's serverless cloudA cloud VM you create, keep, stop and reach from outside
IsolationA fully sandboxed virtual machine; hypervisor not namedVM with its own Linux kernel on Cloud HypervisorFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Root, Docker, systemdCommands do not run with sudo; no Docker documentedYes; start dockerd yourself as the entrypointYes, in every sandbox
Nested virtualizationNot documentedTeam and Enterprise plans only, on request/dev/kvm on every plan
CPU benchmark (4 vCPU / 8 GB)Not measured; vCPU per size not published15.54 runs/s26.69 runs/s
Longest sessionNo total cap published, but it expires after 20 minutes without use24 hours (default 5 minutes)No cap on paid plans; you set the time to live
Files after the sessionDiscarded when the container expires and not recoverableRoot disk is gone; only Volumes and filesystem snapshots keep filesDisk saved every minute and on stop; a stopped sandbox costs nothing and comes back
Fork and snapshotsNoneFilesystem snapshots to boot new sandboxes; memory snapshots in alphaFork a running sandbox with its disk; named snapshots as templates
Inbound accessNone; you reach the container only through the APIEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistSSH, HTTPS URLs for up to 50 ports, raw TCP
Outbound internetCode Interpreter and Hosted Shell: off until an admin sets a domain allowlistOpen by default; block all, IP-range allowlist or domain allowlist (beta)Open internet, no provider-side allowlist
Keeping API keys out of the sandboxdomain_secrets: a sidecar adds the real header, the model sees a placeholderSecrets are environment variables, or you run your own proxy in a sidecarCredentials proxy for model providers and any HTTPS API; switch to another account when credits run out
Coding agentsAgents API (beta) drives a managed Codex harness from outsideExamples only; you install the agent yourselfClaude Code, Codex, OpenCode and more preinstalled, with a prompt, steer and events API
Desktop and computer useHosted browser for the Agents API computer_use toolNot offered; an example shows how to set up Xvfb and VNC yourself60fps desktop, Chromium and computer-use API, embeddable stream
RegionsUS or EU processing for Code Interpreter; Agents API US onlyUS, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75xEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureOpenAI ContainersModal VM Sandboxesboat
Full VM (own kernel)YesYesYes
Docker insideNoYesYes
Nested virtualizationNoYesYes
RootNoYesYes
SystemdNot publishedYesYes
Desktop GUIYesNoYes
BrowserYesNoYes
Computer-use APIYesNoYes
SSHNoYesYes
Persistent diskNoYesYes
Pause/resumeNoNoYes
Automatic snapshotsNoNoYes
Fork/cloneNoYesYes
Live fork (no pause)NoYesYes
Memory forkNoYesNo
Custom image (Docker or snapshot)NoYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestNoNoNo
HTTPS preview URLsNoYesYes
Raw TCP inboundNoYesYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyYesNoYes
Secret proxy for any APIYesNoYes
Preinstalled agentsNoNoYes
Agent harness APIYesNoYes
MCP serverNoNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingYesNoNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)NoNot publishedYes
Audit logsNot publishedYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

OpenAI ContainersNot measured
Modal VM Sandboxes15.54 runs/s
boat26.69 runs/s

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 boat 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.

ScenarioOpenAI Containers, a monthModal VM Sandboxes, a monthboat, 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: boat 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 boat's $2,000 plan queues the starts.

ScenarioOpenAI ContainersModal VM Sandboxesboat
One coding agent, workdays
  • 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
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
One agent that never stops
  • 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
  • Starter: sessions capped at 24 h
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
50 agents in parallel
  • 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
  • files survive a stop only in Volumes: packages installed elsewhere reset
None that bite
Sandboxes for your users
  • 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 biteNone that bite
1,000 short jobs at once
  • 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)
  • shared vCPUs on this tier (Modal (VM Sandboxes) sells dedicated cores separately as “VM Sandbox, request = size”): heavy, sustained CPU use can be slowed by other tenants
  • 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 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 boat 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. boat 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 boat 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. boat 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 boat's 26.69 at 4 vCPU / 8 GB, so every install, build and test waits longer.

Use boat 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: boat vs OpenAI Containers and boat 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 boat 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. boat 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 boat 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 boat 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 boat gives HTTPS URLs for up to 50 ports, raw TCP and SSH.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons