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). Your code can save a sandbox's disk as a filesystem snapshot and start new sandboxes from it. It suits teams that already run models on Modal and want 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 a Responses call makes one. The model runs Python or shell commands in it on a fixed Debian 12 image without sudo. By default the container expires after 20 minutes without use; the create call can set a different idle time. 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. “15th cheapest of 336” means 14 of the other 335 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
106th of 365, with limits
$633 a month
357th of 365, with limits
$17,371 a month
5th cheapest of 365
$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, so your code snapshots the filesystem and starts a new sandbox each day. An OpenAI container expires after 20 minutes without use by default, and its files go with it. boat ranks #6 at $657, with no session cap once auto-stop is off on a paid plan.
61st of 361, with limits
$1,574 a month
344th of 361, with limits
$13,140 a month
6th cheapest of 361
$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, with no machine to manage. In this preset Modal ranks #15 at $140 a month, with fast starts and per-second billing. OpenAI Containers are a compromise at $6,000, because they bill by memory size with a 5-minute minimum and do not publish vCPU.
15th cheapest of 336
$140 a month
198th of 336, with limits
$6,000 a month
189th of 336, 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 giving each of your users a sandbox, at $671 a month, with your code saving each user's files in a filesystem snapshot. OpenAI documents no inbound ports for hosted containers. boat ranks #3 at $209; a stopped boat sandbox has no compute charge and keeps its disk for at least 14 days.
18th cheapest of 349
$671 a month
349th of 349, with limits
$3,780 a month
3rd cheapest of 349
$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 #6 here because that is what it is built for. OpenAI Containers publish no limit on how many can run at once.
6th cheapest of 349
$11,982 a month
195th of 349, with limits
$30,000 a month
39th of 349, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
62nd cheapest of 359
$889 a month
355th of 359, with limits
$5,760 a month
10th cheapest of 359
$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 runs Docker with runtime="vm", at $1,112 a month here. OpenAI documents no Docker, and Code Interpreter starts with no internet until an admin allows domains. boat ranks #2 at $86.
110th cheapest of 374
$1,112 a month
347th of 374, with limits
$1,728 a month
2nd cheapest of 374
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
A dev box you come back to all month restarts every 24 hours on Modal, from a filesystem snapshot your code takes. Hosted OpenAI containers discard their files when they expire. boat ranks #19 at $26 and keeps the disk with no code.
129th of 371, with limits
$9.07 a month
365th of 371, with limits
$1,051 a month
19th cheapest of 371
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Modal ranks #45 here at $153 a month: its official example installs Xvfb, Chromium and noVNC in a VM sandbox. OpenAI has a hosted browser inside the Agents API beta. boat ranks #7 at $200 with a built-in 60 fps desktop and computer tools.
45th cheapest of 367
$153 a month
353rd of 367, with limits
$5,280 a month
7th cheapest of 367
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
57th of 356, with limits
$121 a month
335th of 356, with limits
$1,440 a month
7th cheapest of 356
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
98th cheapest of 343
$252 a month
334th of 343, with limits
$1,755 a month
6th cheapest of 343
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
171st of 327, with limits
$5,957 a month
307th of 327, with limits
$35,100 a month
73rd of 327, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
289th of 351, with limits
$464 a month
310th of 351, with limits
$870 a month
3rd cheapest of 351
$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. OpenAI Containers and boat have no GPUs.
18th cheapest of 102
$1,116 a month
Not ranked: misses a requirementNot ranked: misses a requirement
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement

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; VM runtime with its own kernel available (Modal VM Sandboxes)A fully sandboxed virtual machine; hypervisor not namedFull VM with its own kernel, on AMD Ryzen 7 9700X and Ryzen 9 9950X hosts; vCPUs are shared
Root and DockerRoot; Docker with the VM runtime (runtime="vm"), at the same priceCommands do not run with sudo; no Docker documentedRoot, systemd, Docker and /dev/kvm on every machine
Machine sizeYou request CPU and memory in code; 512 GiB disk by default1, 4, 16 or 64 GB of memory; vCPU not published4 vCPU / 8 GB by default, up to 16 vCPU / 32 GB (needs the $100 plan)
Files after the sessionNo paused state; your code saves the root disk with a filesystem snapshot (kept 30 days by default, or indefinitely) or a Volume, then starts a new sandboxData is discarded when the container expires; Agents API keeps files in /workspace/outputs as artifactsDisk saved every minute and at each stop, with no code; kept at least 14 days, longer with a saved snapshot
Longest session24 hours (default 5 minutes); for longer work, a filesystem snapshot and a new sandboxNo fixed cap while in use; by default expires after 20 minutes without use (configurable with expires_after)No cap once auto-stop is off on a paid plan (default 1 hour, timer up to 30 days)
Snapshots and forkOne filesystem snapshot boots many new sandboxes; memory snapshots in alphaNo snapshot or fork call documented; you create a new container and upload the same filesFork a running sandbox from its last 1-minute snapshot; saved snapshots as templates
Custom imageBuild images in code or pull any linux/amd64 registry imageFixed Debian 12 image; you upload files into each containerboat's image or a saved snapshot; you cannot boot your own Docker image
GPUsT4 to B300; 10 at once on Starter, 50 on TeamNoneNone
Inbound accessEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistNo inbound ports documented for hosted containers; you reach them through the APISSH, HTTPS URLs for up to 50 ports, token-gated by default; raw ports over IPv6 on sandboxes with no IPv4 of their own
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 sidecar (beta)domain_secrets: a sidecar adds the real header for approved domains, the model sees a placeholderOptional paid AI credentials proxy ($1 a day plus $1 per 1,000 requests) for model providers and HTTPS APIs you register
Coding agents, desktop and computer useYou set it up: official examples install a harness and a VNC desktop in the imageAgents API (beta) drives a managed Codex harness, with a hosted browser for computer useSeven harnesses installed with an API to drive them, plus a built-in 60 fps desktop and Chrome
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 onlyGermany, Finland and France; no US or Asia region, and you cannot pick one
Every feature Battleships tracks (43)
FeatureModalOpenAI Containersboat
Full VM (own kernel)No documented wayYesYes
Docker insideNo documented wayNo documented wayYes
Nested virtualizationNo documented wayNo documented wayYes
RootYesNo documented wayYes
SystemdNo documented wayNot publishedYes
Desktop GUIWith your own setupYesYes
BrowserWith your own setupYesYes
Computer-use APIWith your own setupYesYes
SSHWith your own setupNo documented wayYes
Persistent diskWith your own setupNo documented wayYes
Pause/resumeNo documented wayNo documented wayYes
Automatic snapshotsNo documented wayNo documented wayYes
Fork/cloneYesNo documented wayYes
Live fork (no pause)Not publishedNo documented wayYes
Memory forkYesNo documented wayNo documented way
Custom image (Docker or snapshot)YesNo documented wayYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo documented way
Wake on requestNo documented wayNo documented wayNo documented way
HTTPS preview URLsYesNo documented wayYes
Raw TCP inboundYesNo documented wayYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistYesYesNo documented way
Secret proxyNo documented wayYesYes
Secret proxy for any APINo documented wayYesYes
Preinstalled agentsWith your own setupNo documented wayYes
Agent harness APINo documented wayYesYes
MCP serverNo documented wayNo documented wayNo documented way
GPUYesNo documented wayNo documented way
WindowsNo documented wayNo documented wayNo documented way
Arm64No documented wayNo documented wayNo documented way
Self-hostingNo documented wayYesNo documented way
BYOCNo documented wayNo documented wayNo documented way
Open sourceNo documented wayNo documented wayNo documented way
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)Not publishedNo documented wayYes
Audit logsYesNot publishedNo documented way
SSOYesYesNo documented way
SOC 2YesYesNo documented way
HIPAAYesYesNo documented way
EU data residencyYesYesNo documented way
Zero data retentionNot publishedNot publishedYes

Performance

Modal12.60 runs/s
OpenAI ContainersNot measured
boat28.06 runs/s

OpenAI Containers are not in the public benchmarks we use, and OpenAI does not publish the vCPU behind each container size, so we cannot compare them. In StarSling's run of 3 October 2026 (run 37073680030), the V8 Web Tooling Benchmark at 4 vCPU / 8 GB did 28.06 runs/s on boat (second of 15), 15.48 on Modal's VM runtime and 12.60 on Modal gVisor. StarSling ran Modal with cpu=4, and the sandbox saw 4 CPUs (PR #121). Every boat sandbox in that run ran on an AMD Ryzen 9 9950X host; boat also places some sandboxes on other hosts and does not promise a CPU model. Providers ran on different hardware in different regions.

V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Modal measured on: Sandbox (gVisor), request = size, any region. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. OpenAI Containers is not in the public benchmarks we use, so we cannot say which is faster.

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. Start limits, per-start fees and plan minimums are in the price, boat's included.

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
$0 · Starter$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
$109 · 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
$1,480 · 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
$579 · 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
$1,911 · Team · with limits$6,000 · API pay as you go · with limits$8,800 · $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. Modal prices CPU per physical core, and one core equals 2 vCPU, so 4 vCPU / 8 GiB costs $0.476 an hour at a full request. StarSling ran Modal with cpu=4 (PR #121); sized that way, Modal bills 4 cores, $0.76 an hour. 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. The scenarios use the 16 GB size ($1.44 an hour) for 8 GB needs, because OpenAI does not publish the vCPU per size.

OpenAI Containers: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. A 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. A stopped sandbox has no compute charge. Saved snapshots above the plan's count ($0.056 a day each) and the optional AI credentials proxy still charge while sandboxes are stopped. Starts above the plan's included number cost $0.03 to $0.07 each.

Limits in those scenarios

On Modal a sandbox lives at most 24 hours, so the workday, always-on and fleet scenarios restore work from a filesystem snapshot or a Volume, which your code sets up. The 50-agent fleet needs Docker, which Modal runs on its VM runtime. Modal fits the user-sandboxes scenario on Team. OpenAI Containers fit none of the five scenarios: hosted containers discard their files on expiry and document no 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 limit is starts: the $2,000 plan includes 90 a minute and 2,400 a day, and starts above 270 a minute fail with 429, so the 1,000-job burst does not fit.

ScenarioModalOpenAI Containersboat
One coding agent, workdaysNone for this scenario
  • 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 for this scenario
One agent that never stops
  • Starter: sessions capped at 24 h
  • 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 for this scenario
50 agents in parallel
  • missing Docker inside
  • 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 for this scenario
Sandboxes for your usersNone for this scenario
  • 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 for this scenario
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)
  • 2,400 starts/day included, paid above that (needs ~6,667)
  • 600 starts/hour included, paid above that (needs ~1,000)
  • starts above 90/min are paid, and starts above 270/min fail with 429

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, runtime, 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 you run a coding agent that works for hours or days, look at boat. On Modal your code carries the machine across the 24-hour limit with filesystem snapshots, and an OpenAI container discards its files when it expires. boat gives each agent a full VM with root and Docker that keeps its disk with no code and resumes 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 pick the VM runtime for Docker, and that runtime has no GPUs. Every boat sandbox has root, systemd and Docker.

A disk kept with no code

A Modal sandbox ends within 24 hours; your code takes a filesystem snapshot or writes to a Volume first. An OpenAI container expires after 20 idle minutes by default, so your code uploads files again. boat saves the disk every minute and at each stop and keeps it at least 14 days. A machine failure loses what was written after the last snapshot.

Desktop, ports and agents built in

boat has a 60 fps desktop, HTTPS URLs for up to 50 ports and seven coding agents you drive from outside. On Modal you install the desktop yourself, as its VNC example shows. OpenAI documents no inbound ports for hosted containers.

Use boat when your agents work for hours or days and need a real machine they keep: root, Docker, a disk kept with no code, open internet, ports you can reach and a desktop. Compare it one to one: boat vs Modal and boat vs OpenAI Containers.

boat's own limits
  • Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
  • Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
  • A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
  • Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
  • boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
  • Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
  • Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
  • Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source

Questions people ask

Is Modal cheaper than OpenAI Containers?

In our scenarios, yes. One agent running all month costs $109 on Modal against $1,051 on OpenAI, though Modal needs a new sandbox each day. Sandboxes for your users cost $579 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?

We cannot compare them. OpenAI is not in the public benchmark we use and does not publish the vCPU behind its container sizes. In StarSling's run of 3 October 2026, Modal's VM runtime did 15.48 V8 Web Tooling runs/s and Modal gVisor 12.60, at 4 vCPU / 8 GB. boat did 28.06 on an AMD Ryzen 9 9950X host.

Can Modal or OpenAI Containers run Docker?

Modal runs Docker with its VM runtime, chosen with runtime="vm", at the same price. 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; for longer work, Modal recommends a filesystem snapshot and a new sandbox. An OpenAI container has no fixed cap while it is used, but by default it expires after 20 minutes without use (configurable with expires_after), and its data is discarded. On boat, auto-stop defaults to 1 hour; turn it off on a paid plan for no session cap.

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