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

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 workloadModal: price rankOpenAI Containers: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
Can't run it356th 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 boat 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 boat 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 boat 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 boat, 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 boat 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 it308th 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 boat has GPUs.
19th cheapest of 98
$1,187 a month
Can'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

FeatureModalOpenAI Containersboat
What it isServerless sandboxes you create and run commands in from Python, TypeScript or GoA sandbox tool the model uses inside OpenAI's APIA cloud VM you create, keep, stop and reach from outside
IsolationgVisor by default; a VM runtime with its own kernel is available (Modal VM Sandboxes)A fully sandboxed virtual machine; hypervisor not namedFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Root and DockerRoot; Docker only with the VM runtimeCommands do not run with sudo; no Docker documentedRoot, systemd, Docker and /dev/kvm on every machine
Machine sizeYou request CPU and memory in code; the maximum is not published1, 4, 16 or 64 GB of memory; vCPU not published4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB
Files after the sessionRoot disk is wiped when the sandbox ends; only Volumes keep filesData is discarded when the container expiresDisk saved every minute and on stop; a stopped sandbox costs nothing and comes back
Longest session24 hours (default 5 minutes)No fixed cap while in use; expires after 20 minutes without useNo cap on paid plans; you set the time to live
Snapshots and forkFilesystem snapshots to boot new sandboxes; memory snapshots in alphaNo snapshots and no forkFork a running sandbox without stopping it; named snapshots as templates
Custom imageBuild images in code or pull any linux/amd64 registry imageFixed Debian 12 image; you upload files into each containerNamed snapshots of a set-up machine; no Dockerfile builds
GPUsT4 to B300; 10 at once on Starter, 50 on TeamNoneNone
Inbound accessEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistNone; you reach the container only through the APISSH, HTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP
Outbound networkOpen 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 defaultOpen internet on every plan; no provider-side allowlist
Keeping API keys out of the sandboxSecrets are environment variables, or you run your own proxy in a sidecardomain_secrets: a sidecar adds the real header for approved domains, the model sees a placeholderCredentials proxy for model providers and any HTTPS API
Coding agents, desktop and computer useNot built in; examples show how to set up VNC and a harness yourselfAgents API (beta) drives a managed Codex harness, with a hosted browser for computer useClaude Code, Codex and more preinstalled with an API to drive them, plus a 60fps desktop and Chromium
RegionsUS, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75xUS or EU processing for Code Interpreter; Agents API data residency in the US onlyEU only (Germany, Finland, France)
Every feature Battleships tracks (43)
FeatureModalOpenAI Containersboat
Full VM (own kernel)NoYesYes
Docker insideNoNoYes
Nested virtualizationNoNoYes
RootYesNoYes
SystemdYesNot publishedYes
Desktop GUINoYesYes
BrowserNoYesYes
Computer-use APINoYesYes
SSHYesNoYes
Persistent diskYesNoYes
Pause/resumeNoNoYes
Automatic snapshotsNoNoYes
Fork/cloneYesNoYes
Live fork (no pause)NoNoYes
Memory forkYesNoNo
Custom image (Docker or snapshot)YesNoYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestNoNoNo
HTTPS preview URLsYesNoYes
Raw TCP inboundYesNoYes
Public IPv4NoNoNo
Egress allowlistYesYesNo
Secret proxyNoYesYes
Secret proxy for any APINoYesYes
Preinstalled agentsNoNoYes
Agent harness APINoYesYes
MCP serverNoNoNo
GPUYesNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoYesNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)Not publishedNoYes
Audit logsYesNot publishedNo
SSOYesYesNo
SOC 2YesYesNo
HIPAAYesYesNo
EU data residencyYesYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Modal12.79 runs/s
OpenAI ContainersNot measured
boat26.69 runs/s

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

ScenarioModal, a monthOpenAI Containers, 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
$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: boat 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 boat, the 1,000-job burst queues because starts are limited per minute.

ScenarioModalOpenAI Containersboat
One coding agent, workdays
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • 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
  • Starter: sessions capped at 24 h
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • 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
  • missing Docker inside
  • files survive a stop only in Volumes: packages installed elsewhere reset
  • 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 usersNone that bite
  • 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
  • shared vCPUs on this tier (Modal sells dedicated cores separately as “Sandbox (gVisor), request = size, any region”): heavy, sustained CPU use can be slowed by other tenants
  • 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 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 boat 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. boat 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

boat 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 boat 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: boat vs Modal and boat 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. boat 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. boat 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 boat 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. boat 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 boat have no GPUs.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons