Modal vs Together Code Sandbox

Modal gives you sandboxes you can start today, next to GPUs and in regions around the world; each one ends within 24 hours, and filesystem snapshots carry work to a new one. Together Code Sandbox starts VMs from Docker-image snapshots and can save their memory when they end, but Together has to turn it on for your organization.

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.

Together Code Sandbox

Together AI is a cloud for running and training AI models, and Code Sandbox is its product for running code in isolated VMs.

You build a snapshot from a Docker image or Dockerfile on Together's builder, then start sandboxes from it and run commands and file operations through the together-sandbox SDK or CLI. When a sandbox ends you can save its disk, and its memory too, as a new snapshot to start more sandboxes from. It is aimed at model-generated code, agent tool calls and reinforcement learning rollouts, and Together must enable it for your organization. The pricing page also lists Code Interpreter at $0.03 per 60-minute session.

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 rankTogether Code Sandbox: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A software factory needs Docker, root and a disk that stays. boat has all three on every machine and ranks #5 at $634 a month. Modal keeps the disk only through Volumes or snapshots you take, and runs Docker on its VM runtime (#27 at $633). Together does not document Docker inside a sandbox.
106th of 365, with limits
$633 a month
67th of 365, with limits
$528 a month
5th cheapest of 365
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An always-on agent hits Modal's 24-hour limit, so your code snapshots the filesystem and starts a new sandbox each day. A Together sandbox runs until you end it or its ttl ends, with no idle detection, so your backend starts and stops 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
107th of 361, with limits
$1,095 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
For many short code runs, Modal ranks #15 at $140 a month, with fast starts and high concurrency. Together runs short code through exec in a sandbox, once it enables the product for you.
15th cheapest of 336
$140 a month
318th of 336, with limits
$2,190 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 sandboxes for your users at $671 a month, with your code saving each user's files in a filesystem snapshot. On Together every port URL is public unless you set an experimental access policy. 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
231st of 349, with limits
$900 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
Modal is built for huge bursts of short sandboxes and ranks #6 here. Together can branch many copies from one memory snapshot once it enables the VM product for you.
6th cheapest of 349
$11,982 a month
309th of 349, with limits
$21,900 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
Modal runs eval sandboxes at scale from code. Together documents a Harbor guide for agent evals. boat has a Harbor integration too, and ships the coding agents with an API to prompt and follow each run.
62nd cheapest of 359
$889 a month
260th of 359, with limits
$450 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
110th cheapest of 374
$1,112 a month
253rd of 374, with limits
$180 a month
2nd cheapest of 374
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
129th of 371, with limits
$9.07 a month
226th of 371, with limits
$22 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. On Together you build a desktop and a browser into your image yourself. boat ranks #7 at $200 with a built-in 60 fps desktop.
45th cheapest of 367
$153 a month
105th of 367, with limits
$600 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
195th of 356, with limits
$900 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
181st of 343, with limits
$180 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
126th of 327, with limits
$3,600 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
95th of 351, with limits
$150 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. Together Code Sandbox and boat have none in the sandbox.
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

FeatureModalTogether Code Sandboxboat
IsolationgVisor by default; VM runtime with its own kernel available (Modal VM Sandboxes)A VM per sandbox on Together's infrastructureFull VM with its own kernel, on AMD Ryzen 7 9700X and Ryzen 9 9950X hosts; vCPUs are shared
Getting startedSelf-serve; Starter is free with $30 of monthly creditThe SDK and CLI must be enabled for your organization by TogetherSelf-serve with a card (7-day trial); start a sandbox from the API, CLI or dashboard
Docker insideYes with the VM runtime (runtime="vm"), at the same price; not documented on gVisorNot documented; Dev Containers and Docker Compose are not readDocker, systemd and root on every machine
Nested virtualizationVM runtime only, Enterprise plan, as an experimental optionNot documentedYes, /dev/kvm for Android emulators and VMs
Longest session24 hours (default 5 minutes); for longer work, a filesystem snapshot and a new sandboxRuns until you end it or its ttl endsNo cap once auto-stop is off on a paid plan (default 1 hour, timer up to 30 days)
Saving stateNo paused state; files persist through Volumes or filesystem and directory snapshots (30 days by default, or no expiry); memory snapshots are alpha and expire after 7 daysEnd a sandbox with a snapshot of its disk, or disk and memoryDisk saved every minute and at each stop, with no code; resume boots the machine again
ForkOne filesystem snapshot boots many new sandboxesThe parent stops first, then you start many sandboxes from its snapshot, with memory if you askFork a running sandbox from its last 1-minute snapshot; the original keeps running
Machine sizeSet CPU and memory per sandbox; 512 GiB disk by default0.1 to 16 cores, 1 to 8 GB of memory per core; disk size fixed2 to 16 vCPU with 2 GB per vCPU; 16 vCPU / 32 GB needs the $100 plan or higher
GPUsT4 to B300; 10 at once on Starter, 50 on TeamNone in the sandboxNone
RegionsUS, EU and Asia-Pacific; pinning costs 1.15x to 1.75xNot publishedGermany, Finland and France; no US or Asia region, and you cannot pick one
Reaching the sandboxEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistA URL per port, open to everyone by default; an experimental policy limits access by IP or requires a tokenHTTPS URLs for up to 50 ports, token-gated by default; raw ports over public IPv6
Outbound network rulesBlock all, IP-range allowlist, domain allowlist (beta)No egress allowlist documentedNo provider-side allowlist
Desktop and computer useNo built-in desktop; Modal's official example installs Xvfb, Chromium, x11vnc and noVNC in a VM sandboxNo built-in desktop or stream; you install a browser or virtual display in your own imageBuilt-in 1920x1080, 60 fps desktop, Chrome and computer tools
Coding agents and API keysYou install the harness in the image (official OpenCode example); secrets are environment variables or your own sidecar proxy (beta)You install your agent in your image and run it through execs; no credentials proxy documentedSeven harnesses installed with an API to drive them; optional paid AI credentials proxy keeps supported providers' keys out
Every feature Battleships tracks (43)
FeatureModalTogether Code Sandboxboat
Full VM (own kernel)No documented wayYesYes
Docker insideNo documented wayNot publishedYes
Nested virtualizationNo documented wayNo documented wayYes
RootYesYesYes
SystemdNo documented wayNot publishedYes
Desktop GUIWith your own setupNot publishedYes
BrowserWith your own setupNot publishedYes
Computer-use APIWith your own setupNot publishedYes
SSHWith your own setupNo documented wayYes
Persistent diskWith your own setupWith your own setupYes
Pause/resumeNo documented wayYesYes
Automatic snapshotsNo documented wayNo documented wayYes
Fork/cloneYesYesYes
Live fork (no pause)Not publishedNo documented wayYes
Memory forkYesYesNo documented way
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesNo documented wayNo documented way
Wake on requestNo documented wayNo documented wayNo documented way
HTTPS preview URLsYesYesYes
Raw TCP inboundYesNo documented wayYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistYesNo documented wayNo documented way
Secret proxyNo documented wayNo documented wayYes
Secret proxy for any APINo documented wayNo documented wayYes
Preinstalled agentsWith your own setupNo documented wayYes
Agent harness APINo documented wayNo documented wayYes
MCP serverNo documented wayYesNo documented way
GPUYesNo documented wayNo documented way
WindowsNo documented wayNo documented wayNo documented way
Arm64No documented wayNo documented wayNo documented way
Self-hostingNo documented wayNo documented wayNo documented way
BYOCNo documented wayNo documented wayNo documented way
Open sourceNo documented wayNo documented wayNo documented way
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedYesYes
Usage per sandbox (API)Not publishedYesYes
Audit logsYesNot publishedNo documented way
SSOYesYesNo documented way
SOC 2YesYesNo documented way
HIPAAYesNo documented wayNo documented way
EU data residencyYesNot publishedNo documented way
Zero data retentionNot publishedNot publishedYes

Performance

Modal12.60 runs/s
Together Code SandboxNot measured
boat28.06 runs/s

Together Code Sandbox is not in the public benchmarks we use, so there is no comparable score for it. 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. Together Code Sandbox 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 monthTogether Code Sandbox, 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$5 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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$22 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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$264 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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$900 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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 ends. 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, Team is $250 a month with $100 of credit, and pinning a region costs 1.15x to 1.75x.

Together Code Sandbox: Together lists Code Sandbox at $0.0446 per vCPU-hour and $0.0149 per GiB-hour, about $0.30 an hour at 4 vCPU / 8 GB, from prepaid credits, once Together enables it for your organization. Billing granularity, snapshot storage and egress prices are not published. The pricing page also lists Code Interpreter at $0.03 per 60-minute session.

Together Code Sandbox: 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; files survive in a Volume or in a filesystem or directory snapshot (kept 30 days by default, or with no expiry if you turn it off). The 50-agent fleet needs Docker, which Modal runs on its VM runtime. Together Code Sandbox needs Together to enable it for your organization, documents no Docker inside a sandbox, and publishes no concurrency or start limits. On boat the limit that bites is starts: 1,000 short jobs at once need about 6,700 starts a day, more than the 2,400 the $2,000 plan includes, and starts above 270 a minute fail with 429.

ScenarioModalTogether Code Sandboxboat
One coding agent, workdaysNone for this scenario
  • Together pay-as-you-go (prepaid credits; Code Interpreter only): sessions capped at 1 h
  • not confirmed: 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
  • Together pay-as-you-go (prepaid credits; Code Interpreter only): sessions capped at 1 h
  • not confirmed: persistent disk
  • machine size not published
  • different kind of product: code interpreter
None for this scenario
50 agents in parallel
  • missing Docker inside
  • Together pay-as-you-go (prepaid credits; Code Interpreter only): sessions capped at 1 h
  • not confirmed: persistent disk
  • machine size not published
  • different kind of product: code interpreter
None for this scenario
Sandboxes for your usersNone for this scenario
  • machine size not published
  • different kind of product: code interpreter
  • machine size per session not published
  • egress price not published
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
  • machine size not published
  • different kind of product: code interpreter
  • machine size per session not published
  • egress price not published
  • 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

you want to start today, need GPUs or regions outside Europe, or run huge bursts of short sandboxes that finish within a day.

  • Start today, with GPUs nearby. Modal is self-serve and rents GPUs from T4 to B300 on the same platform, useful if your agent runs models.
  • Regions and outbound rules. Modal runs in the US, EU and Asia-Pacific and can block outbound traffic or allow only chosen domains.
  • Huge bursts of short jobs. For thousands of sandboxes that finish in minutes, Modal runs up to 5,000 containers on Team.

Use Together Code Sandbox when

you already run models on Together and want light VMs, from a tenth of a core, that you can save with their memory and branch from.

  • Memory snapshots to branch from. A Together sandbox can end with its memory saved, and every copy started from it comes back with processes running.
  • Very small machines. Sandboxes start at a tenth of a core, which suits large numbers of light tasks once Together enables them.
  • Sandboxes next to your models. If you already run inference or fine-tuning on Together, sandboxes and model calls share one account.

Where boat fits

If your agents work for hours or days, look at boat. Modal ends a sandbox within 24 hours, and your code carries work across with snapshots. Together needs approval first and documents no Docker inside. boat gives each agent a full VM you can start today, with Docker, a desktop and coding agents built in, that keeps its disk with no code.

A machine that keeps its work

A Modal sandbox ends within 24 hours, and its root disk goes with it unless you save to a Volume or take a snapshot. Together saves state when a sandbox ends. boat saves the disk every minute and at each stop, with no compute charge while stopped. Saved snapshots above the plan's count and the optional AI credentials proxy still charge.

Docker, root and /dev/kvm everywhere

On Modal, Docker needs the VM runtime and /dev/kvm the Enterprise plan. Together documents neither Docker inside nor nested virtualization. Every boat sandbox has Docker, systemd, root and /dev/kvm for emulators.

Desktop, agents and private URLs built in

On Modal and on Together you install the desktop yourself. boat ships a 60 fps desktop and seven coding agents you drive from outside. Its HTTPS URLs are token-gated by default, while Together's port URLs are open unless you set an experimental policy.

Use boat when your agents do real work for hours: installs, builds, Docker, emulators, a browser and servers, on a full machine that keeps its disk with no code and that you can start today. Compare it one to one: boat vs Modal and boat vs Together Code Sandbox.

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 Together Code Sandbox?

At Together's Code Sandbox list rates, compute only, Modal costs less in four of five scenarios. One agent always on costs $109 on Modal against $217, though Modal needs a new sandbox each day. 50 agents cost $1,480 on Modal's VM runtime against $2,619, and sandboxes for your users $579 against $744. For 1,000 short jobs at once, Together costs $1,488 against $1,911 on Modal. boat costs $26, $317 and $200 for the first three, and does not fit the burst.

Which is faster, Modal or Together Code Sandbox?

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

Can Modal or Together Code Sandbox run Docker?

Modal runs Docker with its VM runtime (runtime="vm"), at the same price; the default gVisor runtime does not document it. Together builds sandboxes from Docker images but does not document Docker inside a sandbox. Every boat sandbox runs Docker with no extra setting.

How long can a sandbox run on each?

A Modal sandbox lasts 5 minutes by default and 24 hours at most; for longer work, Modal recommends a filesystem snapshot and a new sandbox. A Together sandbox runs until you end it or its ttl ends. On boat, auto-stop defaults to 1 hour; turn it off on a paid plan for no session cap.

Can I use Together Code Sandbox without contacting Together?

No: the together-sandbox SDK and CLI must be enabled for your organization. Modal and boat are both self-serve; boat needs a card, also for the 7-day trial.

Which one has GPUs?

Modal, with GPUs from T4 to B300 that a sandbox can use directly. Together Code Sandbox and boat sandboxes are CPU machines.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons