# Cloudflare Sandboxes vs CodeSandbox SDK: prices, limits and features.

**Their prices for 2 vCPU and 4 GB overlap: $0.036 to $0.18 / hour and $0.15 / hour, since CPU is billed only while busy.** Here is where they differ, from each one's own pages, plus a third option if neither fits.

## The short answer

Cloudflare's Sandbox SDK runs code in Cloudflare Containers, started from a Worker. The CodeSandbox SDK runs microVM sandboxes. Together AI now offers it as Together Code Sandbox and calls the old SDK legacy.

### Pick Cloudflare Sandboxes if you want

- a lower price while the CPU is idle: $0.036 against $0.15 an hour
- CPU billed only while busy; CodeSandbox SDK bills CPU the whole time a sandbox runs
- fork and snapshots: Filesystem snapshots, not memory (beta), which CodeSandbox SDK's pages do not state

### Pick CodeSandbox SDK if you want

- a lower price while the CPU is busy: $0.15 against $0.18 an hour
- largest size: 16 cores (Cloudflare Sandboxes: 4 vCPU and 12 GiB)
- SDK languages: Python and TypeScript (Cloudflare Sandboxes: TypeScript, inside Workers)

### Or Groundbox if you want

- CI runners too: yes, on the same key and bill

Where Cloudflare Sandboxes or CodeSandbox SDK is ahead of Groundbox: longest session.

## Side by side

| Feature | Cloudflare Sandboxes | CodeSandbox SDK | Groundbox |
| --- | --- | --- | --- |
| Price, 2 vCPU · 4 GB | [$0.036 to $0.18 / hour](https://developers.cloudflare.com/containers/pricing/) | [$0.15 / hour](https://www.together.ai/pricing) | $0.08 / hour |
| Pause keeps memory | [No: a new instance starts from a file snapshot](https://developers.cloudflare.com/sandbox/concepts/lifetime/) | Not published | Yes, memory and disk |
| CI runners too | [No: the pricing page lists Containers only](https://developers.cloudflare.com/containers/pricing/) | [No: the pricing page lists Code Sandbox and Code Interpreter only](https://www.together.ai/pricing) | Yes, on the same key and bill |
| Isolation | [microVM with its own kernel](https://developers.cloudflare.com/sandbox/) | [microVM](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | Firecracker VM |
| Fork and snapshots | [Filesystem snapshots, not memory (beta)](https://developers.cloudflare.com/sandbox/concepts/lifetime/) | Not published | Fork a running sandbox; save points |
| Longest session | [No fixed limit, and no run time guaranteed](https://developers.cloudflare.com/sandbox/concepts/lifetime/) | [Runs until stopped, unless a ttl is set](https://docs.together.ai/docs/together-code-sandbox.md) | 720 hours, renewable |
| Self-host | Not published | Not published | No |
| GPUs | Not published | Not published | Not offered |
| Largest size | [4 vCPU and 12 GiB](https://developers.cloudflare.com/containers/platform-details/limits/) | [16 cores](https://docs.together.ai/docs/together-code-sandbox.md) | 16 vCPU |
| SDK languages | [TypeScript, inside Workers](https://developers.cloudflare.com/sandbox/get-started/) | [Python and TypeScript](https://docs.together.ai/docs/together-code-sandbox.md) | TypeScript and Python |
| Security report | Not published | Not published | No SOC 2 report |
| Free to start | [Needs Workers Paid, $5 a month](https://developers.cloudflare.com/containers/pricing/) | [Legacy SDK: a free Build plan](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | $5 of usage, no card |
| Plans | [Needs the Workers Paid plan, $5 / month, which includes some usage](https://developers.cloudflare.com/containers/pricing/) | [Legacy SDK: Build (free) and Scale plans; the new SDK is sold through Together's sales team](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | Free: everything, with $5 of usage. $20 / month: $20 of usage included, then pay as you go |
| CPU | [$0.000020 per vCPU-second of active use ($0.072 per vCPU-hour)](https://developers.cloudflare.com/containers/pricing/) | [$0.0446 per vCPU-hour (Together)](https://www.together.ai/pricing) | $0.04 per vCPU-hour, a dedicated core |
| Memory | [$0.0000025 per GiB-second of provisioned memory ($0.009 per GiB-hour)](https://developers.cloudflare.com/containers/pricing/) | [$0.0149 per GiB-hour (Together)](https://www.together.ai/pricing) | Included, up to 4 GB per vCPU |
| Billing | [Every 10 ms while running](https://developers.cloudflare.com/containers/pricing/) | [Legacy SDK: VM credits at $0.01486 each, rounded up to the minute](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | Per second, no minimum |
| Sizes | [From 1/16 vCPU and 256 MiB to 4 vCPU and 12 GiB; custom types](https://developers.cloudflare.com/containers/platform-details/limits/) | [New SDK: 0.1 to 16 cores, 1 to 8 GB per CPU](https://docs.together.ai/docs/together-code-sandbox.md) | 1 to 16 vCPU, up to 4 GB per vCPU |
| Sandboxes at once | Not published | [Legacy SDK: 10 on Build, 250 on Scale](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | 20 once a card is on file |
| Egress controls | [Internet off, with chosen hostnames passed through a Worker](https://developers.cloudflare.com/sandbox/network/) | Not published | An allowlist of hosts per sandbox |

a rust mark means that side is ahead · each value links to its source · checked 2026-11-20

Each against Groundbox: [Groundbox vs Cloudflare Sandboxes](https://groundbox.dev/compare/cloudflare-sandbox) and [Groundbox vs CodeSandbox SDK](https://groundbox.dev/compare/codesandbox). Every other comparison is on [/compare](https://groundbox.dev/compare).

## Sources

### Cloudflare Sandboxes

- [Cloudflare Containers pricing](https://developers.cloudflare.com/containers/pricing/), checked 2026-11-20
- [Cloudflare Containers limits](https://developers.cloudflare.com/containers/platform-details/limits/), checked 2026-11-19
- [Cloudflare Sandbox SDK](https://developers.cloudflare.com/sandbox/), checked 2026-11-19
- [Cloudflare Sandbox: lifetime](https://developers.cloudflare.com/sandbox/concepts/lifetime/), checked 2026-11-19
- [Cloudflare Sandbox: network](https://developers.cloudflare.com/sandbox/network/), checked 2026-11-19
- [Cloudflare Sandbox: get started](https://developers.cloudflare.com/sandbox/get-started/), checked 2026-11-19

### CodeSandbox SDK

- [Together: Code Sandbox (legacy CodeSandbox SDK)](https://docs.together.ai/docs/together-code-sandbox-legacy.md), checked 2026-11-19
- [Together: Code Sandbox](https://docs.together.ai/docs/together-code-sandbox.md), checked 2026-11-19
- [Together pricing](https://www.together.ai/pricing), checked 2026-11-20

## Try the third option free.

[Start free, no card](https://groundbox.dev/signup)[Groundbox vs Cloudflare Sandboxes](https://groundbox.dev/compare/cloudflare-sandbox)
