CodeSandbox SDK vs Together Code Sandbox
Both come from Together AI. CodeSandbox SDK is the older, self-serve one: its VMs hibernate with their memory and wake on the next HTTP request. Together Code Sandbox is its successor, which you must ask Together to enable, and it saves memory only when a sandbox ends, with no live fork and no wake on request.
The companies and products
CodeSandbox SDK
CodeSandbox SDK is an API from CodeSandbox, now a Together AI company, that starts sandboxed development VMs on the same infrastructure as the CodeSandbox editor.
Each sandbox is a Firecracker microVM built from a template or any Dockerfile. When it goes idle it hibernates with a memory snapshot, and it resumes or forks from that snapshot in seconds. You drive it from a TypeScript SDK through terminals, commands, files and HTTPS hosts. Together's docs now call it the legacy offering and point new users to its successor, the together-sandbox SDK.
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.
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. “46th cheapest of 345” means 45 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.
| Use case and its workload | CodeSandbox SDK: price rank | Together Code Sandbox: price rank | bochka: price rank |
|---|---|---|---|
| Software factory 100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month | 178th of 367, with limits $1,939 a month | 65th of 367, with limits $528 a month | 3rd cheapest of 367 $634 a month |
| Always-on AI employees 50 machines 24/7 · 2 vCPU / 4 GB An assistant that lives on its machine all month needs a lasting disk; CodeSandbox SDK keeps one and hibernates when idle, Together's self-serve Code Interpreter keeps nothing, and bochka runs it with agents built in. | 215th of 366, with limits $2,478 a month | 152nd of 366, with limits $1,095 a month | 5th cheapest of 366 $657 a month |
| Code interpreter bursts 100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month CodeSandbox SDK fits short code runs well, with VMs that hibernate and wake on the next request; Together's self-serve option is Code Interpreter, which runs only Python in 60-minute sessions. | 46th cheapest of 345 $642 a month | 326th of 345, with limits $2,190 a month | 186th of 345, with limits $2,000 a month |
| Sandboxes for your users 300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month CodeSandbox SDK wakes a user's sandbox on their next HTTP request but caps Scale at 250 VMs at once; on Together every port is public and preview URLs are listed as coming soon, while bochka gives each user token-protected HTTPS. | 140th of 361, with limits $1,707 a month | 234th of 361, with limits $900 a month | Cheapest of 361 $209 a month |
| RL rollouts 1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month Both can start many rollouts from a memory snapshot; CodeSandbox SDK can also fork a running sandbox, while Together stops the parent first. | 348th of 360, with limits $3,861 a month | 315th of 360, with limits $21,900 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 CodeSandbox SDK runs evals on its VMs as they are, Together documents a Harbor guide for agent evals, and bochka ships the coding agents with an API to prompt, steer and follow each run. | 64th cheapest of 364 $1,335 a month | 258th of 364, with limits $450 a month | 10th cheapest of 364 $200 a month |
| CI runners 40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month CI jobs that build Android apps or VM images need /dev/kvm, which bochka has and neither CodeSandbox SDK nor Together documents. | 92nd cheapest of 377 $860 a month | 251st of 377, with limits $180 a month | 4th cheapest of 377 $86 a month |
| 24/7 dev boxes 1 machine 24/7 · 4 vCPU / 8 GB | 310th of 368, with limits $240 a month | 210th of 368, with limits $22 a month | 18th cheapest of 368 $26 a month |
| Computer-use agents 50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month Computer-use agents need a desktop and a browser, which bochka streams at 60fps and neither CodeSandbox SDK nor Together offers. | 206th of 369, with limits $691 a month | 184th of 369, with limits $600 a month | 6th cheapest of 369 $200 a month |
| Browser-use agents 50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month bochka ships Chromium on a full desktop in every sandbox; on CodeSandbox SDK you use a headless Chromium template, and on Together you install a browser in your own image. | 251st of 367, with limits $443 a month | 301st of 367, with limits $900 a month | 7th cheapest of 367 $200 a month |
| Scraping & bots (startup scale) 50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month | 281st of 346, with limits $508 a month | 219th of 346, with limits $180 a month | 6th cheapest of 346 $90 a month |
| Mass scraping & bots (undetectable) 1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month | 193rd of 338, with limits $7,390 a month | 124th of 338, with limits $3,600 a month | 71st of 338, with limits $1,800 a month |
| Parallel red teaming 200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month | 240th of 360, with limits $326 a month | 167th of 360, with limits $150 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 it | Can't run it | Can't run it |
| macOS agents 5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month | Can't run it | Can't run it | Can't run it |
Key features
| Feature | CodeSandbox SDK | Together Code Sandbox | bochka |
|---|---|---|---|
| Status and access | Self-serve through CodeSandbox; Together's docs call it the deprecated SDK | The successor; the SDK and CLI must be enabled for your organization by Together | Sign up and start a sandbox from the API, CLI or dashboard |
| Isolation | Firecracker microVM with its own kernel | A VM per sandbox on Together's infrastructure | Full VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts |
| Machine size | 2 to 16 cores self-serve, up to 32 GB on Scale; up to 64 cores and 128 GB on Enterprise | 0.1 to 16 cores, 1 to 8 GB of memory per core; disk size fixed | 2 to 16 vCPU with 2 GB per vCPU, up to 16 vCPU / 32 GB on the $100 plan and above |
| Saving state | Hibernates with a memory snapshot when idle; resumes with processes still running | End a sandbox with a snapshot of its disk, or disk and memory; a new sandbox resumes with processes running | Disk saved every minute and on stop; a stopped sandbox costs nothing; resume boots the machine again |
| Fork | Fork a hibernated sandbox from its snapshot, or a running one sharing its memory | No live fork: the parent stops, then you start many sandboxes from its snapshot | Fork a running sandbox with its disk; the original keeps running |
| Idle and wake | Hibernates after an idle timeout of up to one day; an HTTP request to a host wakes it | Time to live counts from creation; no idle detection and no wake on request | Runs until you stop it or its time to live ends; started again by API |
| Docker and root | Docker and root; built from any Dockerfile | Commands run as user 1000 by default, root on request; Docker inside not documented | Docker, systemd and root on every machine |
| Nested virtualization | Not documented | Not documented | Yes, /dev/kvm for Android emulators and VMs |
| Shell access | Terminals, commands and files through the SDK; no SSH | Commands, interactive shells and files through the SDK and CLI; no SSH | SSH, plus exec and files over the API |
| Reaching the sandbox | HTTPS host per port, public by default, signed tokens for private hosts; no raw TCP | All ports public; preview URLs coming soon; an experimental inbound allowlist | HTTPS URLs for up to 50 ports, token-protected by default; raw TCP; dedicated IPv6 or IPv4 |
| Desktop and browser | No desktop; a headless Chromium template | None; headless command and file access only | Linux desktop streamed at 60fps, Chromium and computer-use tools |
| Coding agents | Run your own agent through the command API | Run your own agent through execs; a Harbor guide for agent evals | Claude Code, Codex and others preinstalled, with a prompt, steer and events API |
| Keeping API keys out of the sandbox | Secrets passed in as environment variables | No credentials proxy documented | Credentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out |
| Hosted code interpreter | No separate product; run code in a VM | Code Interpreter API runs Python in sessions billed per 60 minutes | No separate product; run code through exec in a sandbox |
Every feature Battleships tracks (43)
| Feature | CodeSandbox SDK | Together Code Sandbox | bochka |
|---|---|---|---|
| Full VM (own kernel) | Yes | Yes | Yes |
| Docker inside | Yes | Not published | Yes |
| Nested virtualization | No | No | Yes |
| Root | Yes | Yes | Yes |
| Systemd | Not published | Not published | Yes |
| Desktop GUI | No | No | Yes |
| Browser | No | No | Yes |
| Computer-use API | No | No | Yes |
| SSH | No | No | Yes |
| Persistent disk | Yes | Yes | Yes |
| Pause/resume | Yes | Yes | Yes |
| Automatic snapshots | Yes | No | Yes |
| Fork/clone | Yes | Yes | Yes |
| Live fork (no pause) | Yes | No | Yes |
| Memory fork | Yes | Yes | No |
| Custom image (Docker or snapshot) | Yes | Yes | Yes |
| ≥24 h sessions | Yes | Yes | Yes |
| Idle auto-stop | Yes | No | No |
| Wake on request | Yes | No | No |
| HTTPS preview URLs | Yes | Yes | Yes |
| Raw TCP inbound | No | No | Yes |
| Public IPv4 | No | No | No |
| Egress allowlist | No | No | No |
| Secret proxy | No | No | Yes |
| Secret proxy for any API | No | No | Yes |
| Preinstalled agents | No | No | Yes |
| Agent harness API | No | No | Yes |
| MCP server | No | Yes | No |
| GPU | No | No | No |
| Windows | No | No | No |
| Arm64 | No | No | No |
| Self-hosting | No | No | No |
| BYOC | No | No | No |
| Open source | No | No | No |
| Scoped API keys | Not published | Not published | Yes |
| Spend limits | Not published | Yes | Yes |
| Usage per sandbox (API) | No | Yes | Yes |
| Audit logs | Not published | Not published | No |
| SSO | Yes | Yes | No |
| SOC 2 | Yes | Yes | No |
| HIPAA | No | No | No |
| EU data residency | No | Not published | Yes |
| Zero data retention | Not published | Not published | Yes |
Performance
There is no comparable CPU measurement for CodeSandbox SDK or Together Code Sandbox. bochka did 26.69 runs per second on the StarSling hpc-sandbox-benchmarks Node.js test at 4 vCPU / 8 GB, on dedicated AMD Ryzen 9 9950X hosts, and neither of the other two was part of that run.
Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. CodeSandbox SDK and Together Code Sandbox have 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.
| Scenario | CodeSandbox SDK, a month | Together Code Sandbox, a month | bochka, 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 | $193 · Scale | $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 | $341 · Scale | $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 | $2,500 · Scale | $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 | $815 · Scale · with limits | $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,632 · Scale · with limits | $6,000 · Together pay-as-you-go (prepaid credits; Code Interpreter only) · with limits | $2,000 · $2000/mo · with limits |
CodeSandbox SDK: You buy VM credits and each size burns a fixed number per hour, billed per started minute while the VM runs, including the idle time before it hibernates. The Scale plan adds a $170 monthly platform fee that is not usage credit, and a hibernated VM costs nothing.
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 tables price Together with Code Interpreter: $0.03 per 60-minute session from prepaid credits, with a $5 minimum purchase.
Together Code Sandbox: 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
CodeSandbox SDK's Scale plan allows 250 VMs at once, so the user-sandboxes and 1,000-job scenarios do not fit it, and each VM has a 20 GB disk with no published price for more. The Together column is Code Interpreter, and its limits decide every row: sessions last 60 minutes, nothing is kept after a session, it runs only Python, and the machine size is not published. On bochka the limit that bites is starts: 1,000 short jobs at once need more starts than even the $2,000 plan allows, so starts are queued.
| Scenario | CodeSandbox SDK | Together Code Sandbox | bochka |
|---|---|---|---|
| One coding agent, workdays |
|
| None that bite |
| One agent that never stops |
|
| None that bite |
| 50 agents in parallel |
|
| None that bite |
| Sandboxes for your users |
|
| None that bite |
| 1,000 short jobs at once |
|
|
|
Which one should you use?
Use CodeSandbox SDK when
you want to sign up today and need sandboxes that sleep between visits, wake on the next HTTP request with their memory intact, or fork while running, and you are fine building on an SDK Together calls deprecated.
- Hibernation and wake on request. Good for previews that sleep between visits: an HTTP request wakes a hibernated VM with its processes still running.
- Live forks that share memory. Useful for branching many runs from a sandbox that is still running, without stopping the parent first.
- Self-serve today, bigger on Enterprise. You can sign up without asking anyone, and Enterprise offers machines up to 64 cores and 128 GB.
Use Together Code Sandbox when
you already run models on Together, can get it enabled for your organization, and want light sandboxes from a tenth of a core that you can save with their memory and branch from.
- The SDK Together is building on. Teams starting fresh on Together get the successor SDK rather than the one its docs call deprecated.
- Very small machines. Good for many light jobs: sandboxes start at a tenth of a core, with 1 to 8 GB of memory per core.
- Sandboxes next to your models. Handy if you already run inference on Together: sandboxes, Code Interpreter and models share one account and API key.
Where bochka fits
Choosing between these two often means choosing between a deprecated SDK and one you have to ask for. If your agents do real work for hours, with installs, Docker, emulators, a browser and servers other people reach, bochka gives each one a whole machine you can start today, with the agent and its keys already set up.
A whole machine with SSH and KVM
Neither CodeSandbox SDK nor Together offers SSH or documents /dev/kvm, and Together does not document Docker inside, so emulator builds and VM tests cannot start. bochka has SSH, systemd, root, Docker and /dev/kvm on every sandbox.
Hosting that is private by default
CodeSandbox SDK hosts are public unless you sign tokens, and every Together port is public until you write an experimental policy, with no raw TCP on either. bochka serves 50 token-protected HTTPS ports plus raw TCP.
Agents, desktop and keys built in
On both, you build the agent harness and browser yourself, and keys sit inside a machine the agent controls. bochka preinstalls Claude Code and Codex, streams a 60fps desktop, and keeps keys outside in a credentials proxy.
Use bochka when your agents do real work for hours: installs, builds, Docker, emulators, a browser and servers other people reach, on a full machine you can start today with the agent and its keys already set up. Compare it one to one: bochka vs CodeSandbox SDK and bochka vs Together Code Sandbox.
Questions people ask
Is Together Code Sandbox the same as CodeSandbox SDK?
No. CodeSandbox SDK runs on CodeSandbox's Firecracker microVMs, and Together's docs now call it deprecated. Its successor, the together-sandbox SDK, drops live fork, idle hibernation and wake on request, and replaces them with snapshots taken when a sandbox ends.
Is CodeSandbox SDK cheaper than Together Code Sandbox?
Together's VMs are not self-serve, so the tables price Together with Code Interpreter, which does not fit these scenarios. CodeSandbox SDK costs $815 against $900 a month for sandboxes for your users and $1,632 against $6,000 for 1,000 short jobs at once, though both exceed its 250-VM Scale cap. bochka comes to $200 and $2,000 a month for those.
Which is faster?
Neither CodeSandbox SDK nor Together Code Sandbox has a comparable CPU measurement. bochka did 26.69 runs per second on the StarSling Node.js test at 4 vCPU / 8 GB.
Can CodeSandbox SDK and Together Code Sandbox run Docker?
CodeSandbox SDK runs Docker with root inside its VMs. Together builds sandboxes from Docker images, but its new SDK does not document Docker inside a sandbox. bochka runs Docker, systemd and root on every machine and also exposes /dev/kvm.
Which one can keep a sandbox's memory?
Both. CodeSandbox SDK hibernates an idle VM with its memory and wakes it on the next request. Together saves memory when a sandbox ends, and new sandboxes start from that snapshot. bochka saves the disk every minute and on stop, and resuming boots the machine again.
Can I SSH into either one?
No. Both connect through their SDKs with terminals or shells, commands and files. Every bochka sandbox has SSH as well as an exec and files API.
Try bochka
Install the CLI, then run bochka new.
Product preview
More comparisons
- bochka vs CodeSandbox SDK
- bochka vs Together Code Sandbox
- E2B vs CodeSandbox SDK
- Daytona vs CodeSandbox SDK
- Modal vs CodeSandbox SDK
- Vercel Sandbox vs CodeSandbox SDK
- Cloudflare Sandbox vs CodeSandbox SDK
- Blaxel vs CodeSandbox SDK
- Runloop vs CodeSandbox SDK
- Tensorlake vs CodeSandbox SDK
- Morph Cloud vs CodeSandbox SDK
- CodeSandbox SDK vs Northflank