Together Code Sandbox vs Modal VM Sandboxes

Together Code Sandbox starts VMs from Docker-image snapshots and can save their memory to branch from, but Together has to turn it on for your organization. Modal VM Sandboxes are self-serve VMs with their own kernel and Docker inside, and each one ends within 24 hours.

The companies and products

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 it must be enabled for your organization by Together. Together also sells Code Interpreter, a separate API that runs Python code in short sessions.

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. “65th cheapest of 367” means 64 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 workloadTogether Code Sandbox: price rankModal VM Sandboxes: price rankbochka: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
Both are a compromise here: Together's VM product is gated and does not document Docker inside, and a Modal VM ends within 24 hours, while bochka ranks 3rd with Docker, root and a disk that stays.
65th of 367, with limits
$528 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 cannot stay on a Modal VM Sandbox, which stops at 24 hours; Together has no idle detection or wake on request, so your backend starts and stops it.
152nd of 366, with limits
$1,095 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
Together's Code Interpreter is built for short Python runs billed per 60-minute session, and it keeps nothing after the session ends.
326th of 345, with limits
$2,190 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 this scenario on its Team plan with tunnels and connect tokens, while on Together every port of a sandbox is public and preview URLs are still listed as coming soon.
234th of 361, with limits
$900 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
Together can start many copies from one memory snapshot and Modal is built for huge bursts of short jobs; bochka's per-plan start limits queue very large bursts.
315th of 360, with limits
$21,900 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
258th of 364, with limits
$450 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
Modal and bochka both run Docker builds in a VM, but only bochka gives every plan /dev/kvm for Android emulators; Together does not document Docker inside a sandbox.
251st of 377, with limits
$180 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
210th of 368, with limits
$22 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
Neither offers a desktop: Together is headless only and on Modal you set up Xvfb and VNC yourself, while bochka streams a 60fps desktop with Chromium.
184th of 369, with limits
$600 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
On both Together and Modal you install the browser into your own image; bochka ships Chromium on a full desktop in every sandbox.
301st of 367, with limits
$900 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
219th of 346, with limits
$180 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
124th of 338, with limits
$3,600 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
167th of 360, with limits
$150 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

FeatureTogether Code SandboxModal VM Sandboxesbochka
IsolationA VM per sandbox on Together's infrastructureA VM with its own Linux kernel on Cloud HypervisorFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Getting startedThe SDK and CLI must be enabled for your organization by Together; only Code Interpreter is self-serveSelf-serve; Starter is free with $30 of monthly creditSign up and start a sandbox from the API, CLI or dashboard
Machine size0.1 to 16 cores, 1 to 8 GB of memory per core; disk size fixedYou request CPU and memory per sandbox and pay for the request or for what you use, whichever is higher2 to 16 vCPU with 2 GB per vCPU, up to 16 vCPU / 32 GB on the $100 plan and above
Docker, root and systemdCommands run as user 1000 by default, root on request; Docker inside not documentedYes; you start dockerd yourself as the entrypointDocker, systemd and root ready in every sandbox
Nested virtualizationNot documentedTeam and Enterprise plans only, on requestYes, /dev/kvm on every plan for Android emulators and VMs
CPU benchmark (4 vCPU / 8 GB)Not measured15.54 runs/s26.69 runs/s
Longest sessionRuns until you terminate it or its time to live, counted from creation, ends24 hours (default 5 minutes); continue with a filesystem snapshotNo cap on paid plans; you set the time to live
Saving stateEnd a sandbox with a snapshot of its disk, or disk and memory; new sandboxes resume with processes runningNo paused state; files kept only in Volumes or snapshots; memory snapshots in alpha, expire after 7 daysDisk saved every minute and on stop; a stopped sandbox costs nothing; no memory snapshots
ForkNo live fork: the parent stops, then you start many sandboxes from its snapshotSnapshot the filesystem into an image and boot any number of new sandboxes from itFork a running sandbox with its disk; the original keeps running
Reaching the sandboxAll ports public; preview URLs coming soon; an experimental inbound allowlistEncrypted and raw TCP tunnels, connect tokens, inbound IP allowlistHTTPS URLs for up to 50 ports, token-protected by default, plus raw TCP on a dedicated IPv6 or IPv4
Outbound network rulesNo outbound allowlistBlock all, IP-range allowlist, domain allowlist (beta)Open internet, no provider-side allowlist
Desktop, browser, computer useNone; headless command and file access onlyNot offered; an example shows how to set up Xvfb and VNC yourselfLinux desktop streamed at 60fps, Chromium and a computer-use API
Coding agents and API keysRun your own agent through execs; no credentials proxy documentedExamples only; secrets are environment variables, or you run your own proxy in a sidecarClaude Code, Codex and others preinstalled with a prompt, steer and events API; a credentials proxy keeps real keys out for any HTTPS API
RegionsNot publishedUS, EU and Asia-Pacific; pinning a region costs 1.15x to 1.75xEU only: Germany, Finland, France
Every feature Battleships tracks (43)
FeatureTogether Code SandboxModal VM Sandboxesbochka
Full VM (own kernel)YesYesYes
Docker insideNot publishedYesYes
Nested virtualizationNoYesYes
RootYesYesYes
SystemdNot publishedYesYes
Desktop GUINoNoYes
BrowserNoNoYes
Computer-use APINoNoYes
SSHNoYesYes
Persistent diskYesYesYes
Pause/resumeYesNoYes
Automatic snapshotsNoNoYes
Fork/cloneYesYesYes
Live fork (no pause)NoYesYes
Memory forkYesYesNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopNoYesNo
Wake on requestNoNoNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoYesYes
Public IPv4NoNoNo
Egress allowlistNoYesNo
Secret proxyNoNoYes
Secret proxy for any APINoNoYes
Preinstalled agentsNoNoYes
Agent harness APINoNoYes
MCP serverYesNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsYesNot publishedYes
Usage per sandbox (API)YesNot publishedYes
Audit logsNot publishedYesNo
SSOYesYesNo
SOC 2YesYesNo
HIPAANoYesNo
EU data residencyNot publishedYesYes
Zero data retentionNot publishedNot publishedYes

Performance

Together Code SandboxNot measured
Modal VM Sandboxes15.54 runs/s
bochka26.69 runs/s

In the same hpc-sandbox-benchmarks run at 4 vCPU / 8 GB on 29 September 2026, bochka finished 26.69 Node.js build-and-test runs per second and Modal's VM runtime finished 15.54, so bochka did about 1.7 times the CPU work in the same time. Together Code Sandbox was not part of that run, so there is no comparable score for it. This measures CPU speed only, not start time.

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

ScenarioTogether Code Sandbox, a monthModal VM Sandboxes, a monthbochka, 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
$5 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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
$22 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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
$264 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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
$900 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · 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 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · with limits$3,193 · Team · with limits$2,000 · $2000/mo · with limits

Together Code Sandbox: Together lists Code Sandbox at $0.0446 per vCPU-hour and $0.0149 per GiB-hour, but the VMs must be enabled for your organization, so the table prices Code Interpreter: $0.03 per 60-minute session from prepaid credits, with a $5 minimum.

Modal VM Sandboxes: Modal bills by the second for the CPU and memory you request or what you use, whichever is higher, 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: Plans start at $20 a month, and the whole fee becomes usage credit. You pay per second while a sandbox runs, and a stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

The Together column is Code Interpreter, so sessions last 60 minutes, nothing is kept, it runs only Python and the machine size is not published, which is why no scenario fits. A Modal VM lives at most 24 hours and keeps files only in a Volume or snapshot, so the workday, always-on and fleet scenarios do not fit, while sandboxes for your users fit on Team at $792 a month. The 1,000-job burst on Modal uses shared CPU above a small request, and on bochka it needs more starts per hour and per day than even the $2,000 plan allows.

ScenarioTogether Code SandboxModal VM Sandboxesbochka
One coding agent, workdays
  • Together pay-as-you-go (prepaid credits; Code Interpreter only): sessions capped at 1 h
  • 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
  • Together pay-as-you-go (prepaid credits; Code Interpreter only): sessions capped at 1 h
  • 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
  • Together pay-as-you-go (prepaid credits; Code Interpreter only): sessions capped at 1 h
  • 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
  • machine size not published
  • different kind of product: code interpreter
  • machine size per session not published
  • egress price not published
None that biteNone that bite
1,000 short jobs at once
  • machine size not published
  • different kind of product: code interpreter
  • machine size per session not published
  • egress price not published
  • 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 Together Code Sandbox when

you already run models on Together, can get the VM product enabled, and want light sandboxes you can save with their memory and branch from, or a simple Python runner billed per session.

  • 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 and API key.
  • Very small machines and a Python runner. Good for many light jobs: sandboxes start at a tenth of a core, and a Python interpreter API bills per session.

Use Modal VM Sandboxes when

you want self-serve VMs with Docker today for jobs that finish within a day, need huge bursts, regions outside Europe or strict outbound rules, or already run models on Modal.

  • Self-serve VMs with Docker inside. Good if you want to start today: sign up, set runtime to vm, and run Docker, FUSE and systemd in a real kernel.
  • Very large bursts and regions. Useful for huge bursts of short jobs: 5,000 containers at once on Team, in the US, EU or Asia-Pacific.
  • Outbound rules. Helpful when an agent must reach only chosen hosts: block all outbound traffic, or allow only certain IP ranges or domains.

Where bochka fits

If your agents work for hours or days on a machine they come back to, both Together and Modal make you rebuild the machine from snapshots. bochka gives each agent a full VM you can sign up for today, which keeps its disk, has no session cap on paid plans, and comes with Docker, /dev/kvm, a desktop and coding agents built in.

A machine that keeps its work

A Modal VM ends within 24 hours and its root disk goes with it, and Together keeps state only as a snapshot taken when a sandbox ends. bochka saves the disk every minute, and a stopped sandbox costs nothing.

Docker, KVM and private ports on every plan

Together documents neither Docker inside nor nested virtualization, and every port is public. Modal gives /dev/kvm only on its paid Team plan, after you ask support. bochka has both on every plan, with token-protected HTTPS on 50 ports.

Desktop, agents and keys built in

Neither has a desktop: on Modal you set up Xvfb and VNC, on Together you build it into an image. bochka streams a 60fps desktop, preinstalls coding agents you drive from outside, and keeps API keys out of the sandbox.

Use bochka when your agents work for hours or days in a machine they come back to: installs, builds, Docker, emulators, a desktop and servers others reach, on a faster VM that keeps its disk. Compare it one to one: bochka vs Together Code Sandbox and bochka vs Modal VM Sandboxes.

Questions people ask

Is Together Code Sandbox cheaper than Modal VM Sandboxes?

Together's only self-serve price is Code Interpreter, which looks cheaper, $264 against $2,229 a month for 50 agents, but fits none of the scenarios because sessions end after 60 minutes and keep no disk. For sandboxes for your users, Modal fits at $792 against $900 on Together, and bochka costs $200 a month.

Which is faster, Together Code Sandbox or Modal VM Sandboxes?

Together Code Sandbox has no comparable CPU measurement. On the hpc-sandbox-benchmarks test at 4 vCPU / 8 GB, Modal's VM runtime did 15.54 runs per second and bochka did 26.69, about 1.7 times the CPU work.

Can Together Code Sandbox run Docker?

Together builds sandboxes from Docker images, but its SDK runs commands as user 1000 by default and does not document Docker inside a sandbox. Modal VM Sandboxes run Docker once you start dockerd, and bochka has Docker, systemd and root ready in every sandbox.

How long can each sandbox run?

A Together sandbox runs until you terminate it or its time to live ends, counted from creation, with no idle detection or wake on request. A Modal VM Sandbox defaults to 5 minutes and stops at 24 hours. bochka has no session cap on paid plans.

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; only Code Interpreter is self-serve, with prepaid credits. Modal VM Sandboxes are self-serve on the free Starter plan, and bochka is self-serve from its $20 plan.

Can either save a sandbox with its memory?

Together can save disk and memory when a sandbox ends, and new sandboxes come back with processes running. Modal has memory snapshots in alpha: taking one ends the sandbox and it expires after 7 days. bochka saves the disk every minute but not memory.

Try bochka

Install the CLI, then run bochka new.

Product preview

More comparisons

Bochka product preview · Pricing, benchmarks and commands are illustrative. Sandbox provisioning is not connected.