Cloudflare Sandbox vs Together Code Sandbox

Cloudflare Sandbox runs containers in their own microVMs inside Workers. They sleep when idle, wake on the next request, and keep files through snapshots or R2 that your code sets up. Anyone on Workers Paid can use it. Together Code Sandbox starts VMs from snapshots and can save their disk and memory when they end, but Together has to enable it for your organization.

The companies and products

Cloudflare Sandbox

Cloudflare Sandbox SDK runs untrusted or AI-generated code in Linux containers on Cloudflare's network, driven from a Cloudflare Worker.

Each sandbox is a Cloudflare Container backed by a Durable Object. Each container runs in its own Firecracker microVM with its own kernel and network. You build a linux/amd64 image, pick an instance type of up to 4 vCPU and 12 GiB, and reach the sandbox through your own Worker. The disk resets when the container stops, and your code keeps files with snapshots, automatic saves, R2 backups or R2 bucket mounts. It suits teams already on Workers who want sandboxes that sleep when idle. For code that only calls known methods, Cloudflare also offers Dynamic Workers, which run JavaScript in V8 isolates.

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. “43rd cheapest of 361” means 42 of the other 360 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 workloadCloudflare Sandbox: 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 files that stay. On Cloudflare your code saves snapshots, automatic saves or R2, and Docker runs with iptables off. Together's docs do not describe Docker inside a sandbox. boat has Docker, root, /dev/kvm and a disk saved with no code.
192nd of 365, with limits
$1,543 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
43rd cheapest of 361
$2,188 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
Both run short code through an API. Cloudflare bills CPU only while busy and wakes on the next request. Together's pricing page also lists Code Interpreter at $0.03 per 60-minute session.
17th cheapest of 336
$144 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
Cloudflare and boat both fit sandboxes for your users. On Together every port URL is public unless you set an experimental access policy; boat's HTTPS URLs are token-protected by default.
19th cheapest of 349
$731 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
Together can save a sandbox with its memory and start many copies from it, which suits rollouts that branch from one warm state, once Together enables it for you. Cloudflare starts new sandboxes from a filesystem snapshot. boat forks from its last 1-minute disk snapshot, without memory.
147th of 349, with limits
$9,428 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
Cloudflare fits agent evals with short sandboxes that wake on request. Together documents a Harbor guide for evals. boat has a Harbor integration too, and ships coding agents with an API to prompt and follow each run.
60th cheapest of 359
$818 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
303rd of 374, with limits
$704 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
A dev box should keep its files when you log off. Cloudflare starts a fresh disk after sleep unless your code restores a snapshot (beta, 30 days) or mounts an R2 bucket. Together saves state when a sandbox ends. boat keeps a stopped disk at least 14 days with no compute charge.
123rd cheapest of 371
$93 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
Neither Cloudflare nor Together ships a built-in desktop. On Cloudflare you build one into your image, or use the separate Browser Run service; on Together you install a browser or virtual display in your image. boat streams a 60 fps desktop with Chrome.
207th of 367, with limits
$460 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
68th of 356, with limits
$233 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
102nd cheapest of 343
$286 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
168th of 327, with limits
$5,741 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
Red-team runs often need nested VMs and raw TCP. boat has /dev/kvm and raw ports over public IPv6. Neither Cloudflare nor Together documents nested virtualization, and Cloudflare takes no raw TCP inbound.
25th cheapest of 351
$325 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
Not ranked: misses a requirementNot 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

FeatureCloudflare SandboxTogether Code Sandboxboat
IsolationFirecracker microVM per container, own kernel and networkA VM per sandbox on Together's infrastructureFull VM with its own kernel, on a physical host dedicated to boat (AMD Ryzen 7 9700X or Ryzen 9 9950X); vCPUs are shared
Getting startedSelf-serve on Workers Paid ($5 a month minimum), driven from your own WorkerThe SDK and CLI must be enabled for your organization by TogetherSign up with a card (7-day trial), then start a sandbox from the API, CLI or dashboard
Machine sizeInstance types up to 4 vCPU / 12 GiB / 20 GB disk0.1 to 16 cores, 1 to 8 GB of memory per core; disk size not configurable2 to 16 vCPU at 2 GB per vCPU, disk 51 to 251 GB; 16 vCPU needs the $100 plan or higher
Files between sessionsDisk is fresh after sleep; keep files with snapshots (public beta, 30 days), scheduled automatic saves, R2 directory backups or a mounted R2 bucketEnd a sandbox with a snapshot of its disk, or disk and memory, to start from laterDisk saved every minute and at each stop, with no code; kept at least 14 days after a stop, longer as a saved snapshot
Memory snapshotsNo; snapshots keep the filesystem, not memory or processesYes; a new sandbox from a memory snapshot comes back with its processes runningNo; a resume is like a reboot
ForkSnapshot or back up a running sandbox, then start new sandboxes from it; no one-call forkThe parent stops first, then you start many sandboxes from its snapshot, with memory if you askFork a running sandbox and the original keeps running; the fork uses the last 1-minute disk snapshot
Docker, root and systemddocker:dind with iptables and IP forwarding turned offCommands run as user 1000 by default, root per exec on request; Docker inside a sandbox not documentedDocker with BuildKit and Compose, root and systemd
Nested virtualizationNot documentedNot documentedYes, /dev/kvm for Android emulators and VMs
Idle and wakeStops after inactivity and wakes on the next requestRuns until you terminate it or its ttl ends; no idle detection and no wake on requestAuto-stop 1 h after create or resume by default (up to 30 days, or off on paid plans); no idle timer
Reaching the sandboxHTTP and WebSocket previews routed through your Worker; SSH; no raw TCP inbound or public IPA URL per port, open to everyone by default; an experimental policy limits access by IP or requires a tokenUp to 50 HTTPS URLs, token-gated by default; SSH; raw ports over public IPv6
Egress controlallowedHosts deny-by-default list plus outbound handlers you write in Worker codeNo egress allowlist documentedNo provider-side allowlist; filter inside the VM with root
Keeping API keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeNo credentials proxy documentedOptional paid proxy ($1 a day while on, plus $1 per 1,000 requests) for model providers and HTTPS APIs you register
Desktop and browserBuilt-in desktop removed in SDK 0.10.2; build one into your own image, or use the separate Browser Run service for headless browsersNo built-in desktop or stream; install a browser or virtual display in your own image1920x1080, 60 fps desktop and Chrome, computer tools, embeddable stream; no GPU
Coding agentsGuides for Claude Code, Codex, OpenCode and Pi in your imageYou install your agent in your image and run it through execs; a Harbor guide for agent evalsSeven installed (Claude Code, Codex, OpenCode and more), with a prompt, steer and events API
Every feature Battleships tracks (43)
FeatureCloudflare SandboxTogether Code Sandboxboat
Full VM (own kernel)YesYesYes
Docker insideYesNot publishedYes
Nested virtualizationNo documented wayNo documented wayYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUINo documented wayNot publishedYes
BrowserWith your own setupNot publishedYes
Computer-use APINo documented wayNot publishedYes
SSHYesNo documented wayYes
Persistent diskWith your own setupWith your own setupYes
Pause/resumeNo documented wayYesYes
Automatic snapshotsWith your own setupNo documented wayYes
Fork/cloneWith your own setupYesYes
Live fork (no pause)With your own setupNo documented wayYes
Memory forkNo documented wayYesNo documented way
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesNo documented wayNo documented way
Wake on requestYesNo documented wayNo documented way
HTTPS preview URLsYesYesYes
Raw TCP inboundNo documented wayNo documented wayYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistYesNo documented wayNo documented way
Secret proxyYesNo documented wayYes
Secret proxy for any APIYesNo documented wayYes
Preinstalled agentsYesNo documented wayYes
Agent harness APIWith your own setupNo documented wayYes
MCP serverNo documented wayYesNo documented way
GPUNo documented wayNo 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 sourceYesNo documented wayNo documented way
Scoped API keysNot publishedNot publishedYes
Spend limitsNo documented wayYesYes
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

Cloudflare SandboxNot measured
Together Code SandboxNot measured
boat28.06 runs/s

Neither Cloudflare Sandbox nor Together Code Sandbox is in StarSling's run of 3 October 2026 (run 37073680030), so we cannot say which is faster. In that run boat did 28.06 runs/s on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, second of 15. 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.

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. 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. Cloudflare Sandbox and Together Code Sandbox are 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.

ScenarioCloudflare Sandbox, 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
$39 · Workers Paid$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
$148 · Workers Paid$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,660 · Workers Paid$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
$476 · Workers Paid$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,889 · Workers Paid · with limits$6,000 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · with limits$8,800 · $2000/mo · with limits

Cloudflare Sandbox: You need Workers Paid ($5 a month minimum). CPU is billed only while busy, at $0.072 per vCPU-hour. Memory and disk are billed on the instance size in 10 ms steps until the container sleeps. 4 vCPU always comes with 12 GiB. Snapshot pricing is not published.

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 scenario table uses the Code Interpreter line ($0.03 per 60-minute session), because Code Sandbox needs enablement.

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 default 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. The $20 plan includes 12 starts a minute, 60 an hour and 200 a day; extra starts cost $0.03 to $0.07. A stopped sandbox has no compute charge and keeps its disk at least 14 days. Saved snapshots above the included count ($0.056 a day each) and the AI proxy, if on, still bill while stopped.

Limits in those scenarios

Cloudflare keeps 50 GB of files between days only through snapshot, automatic-save or R2 code, and its local disk tops out at 20 GB. Its 1,500 vCPU account limit is short of the 2,000 vCPU the 1,000-job burst needs, raised on request. The Together column uses Code Interpreter, so no scenario fits as published: sessions last 60 minutes and the machine size is not published. Code Sandbox, the VM product, goes up to 16 cores, but Together publishes no concurrency or start limits for it. boat does not fit the burst either: the $2,000 plan includes 90 starts a minute and 600 an hour, charges $0.03 to $0.07 for extra starts, and refuses starts above 270 a minute.

ScenarioCloudflare SandboxTogether 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 stopsNone 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
50 agents in parallelNone 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
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
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • 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 Cloudflare Sandbox when

your app already runs on Workers and you want short sandboxes you can start today that sleep when idle, wake on the next request and follow egress rules you write.

  • Start today on Workers. Anyone on Workers Paid can create sandboxes now, next to Durable Objects and R2, with no access request.
  • Sleeps when idle, wakes on request. Useful for many short, spiky sessions: a sandbox sleeps when idle, wakes on the next request, and bills CPU only while busy.
  • Egress rules you can program. Cloudflare can block every host except the ones you list, and run your own code on each outbound request.

Use Together Code Sandbox when

you already run models on Together, can get the VMs enabled, and want to save a sandbox with its memory and branch many runs from it.

  • Memory snapshots to branch from. Useful for rollouts and test variants: save a sandbox with its memory and start many copies with processes still running.
  • Sandboxes next to your models. Handy if you already run inference or fine-tuning on Together: sandboxes and models share one account.
  • Sizes cut to the job. Good for many light jobs: sandboxes start at a tenth of a core, priced per vCPU-hour and GiB-hour.

Where boat fits

Cloudflare suits short sandboxes inside a Workers app, and Together suits branching from warm memory snapshots once it is enabled for you. If your agents work for hours on builds, Docker, emulators, a browser and servers other people reach, boat gives each one a full VM that saves its disk with no code, with the agents already set up. boat runs only in the EU, has no GPU and limits starts per plan.

A whole machine

Cloudflare runs Docker with iptables turned off on 20 GB of disk. Together runs commands as a normal user by default and documents neither Docker inside nor /dev/kvm. boat has Docker with BuildKit, root, systemd and /dev/kvm.

Files saved while it runs

On Cloudflare your code saves snapshots (kept 30 days), automatic saves or R2. Together saves state when a sandbox ends. boat saves the disk every minute and at each stop, and can fork a sandbox while it runs. Memory is not saved, so a resume is like a reboot.

Agents and a desktop built in

On both you bake the agent and any desktop into your own image, and on Cloudflare you write the code that adds each token. boat preinstalls seven agents, streams a 60 fps desktop and offers an optional paid credentials proxy.

Use boat when your agents do real work for hours: builds, Docker, emulators, a desktop and servers others reach over HTTPS or raw ports, on a VM that saves its disk with no code. Compare it one to one: boat vs Cloudflare Sandbox 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 Cloudflare Sandbox cheaper than Together Code Sandbox?

At Together's Code Sandbox list rates, compute only, Cloudflare is lower in four of five scenarios: one always-on agent is $148 against $217, and 300 user sandboxes are $476 against $744. For 1,000 short jobs at once Together is lower, $1,488 against $1,889. Code Sandbox must be enabled by Together, so the scenario table uses its Code Interpreter line. boat costs $26 and $200 for the first two, and $8,800 for the burst, because it bills extra starts.

Which is faster, Cloudflare Sandbox or Together Code Sandbox?

We cannot say. Neither is in StarSling's run of 3 October 2026. boat did 28.06 V8 Web Tooling runs/s in that run at 4 vCPU / 8 GB, on an AMD Ryzen 9 9950X host; boat also places some sandboxes on other hosts.

Can Cloudflare Sandbox or Together Code Sandbox run Docker?

Cloudflare supports docker:dind with the daemon's iptables and IP forwarding turned off. Together builds sandboxes from Docker images, but its docs do not describe Docker inside a sandbox. boat runs Docker with BuildKit and Compose, root and systemd.

Which one keeps my files?

Both can. Cloudflare keeps files with a snapshot (public beta, 30 days), scheduled automatic saves, an R2 backup or a mounted R2 bucket. Together saves a sandbox's disk, or disk and memory, as a snapshot when it ends. boat saves the disk every minute and at each stop with no code, and keeps it at least 14 days after a stop.

Can I sign up for Together Code Sandbox today?

The together-sandbox SDK and CLI must be enabled for your organization, so you ask Together for access. Code Interpreter is self-serve with prepaid credits. Cloudflare Sandbox is self-serve on Workers Paid. boat is self-serve from a 7-day trial with a card.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons