# CodeSandbox SDK vs Modal: prices, limits and features.

**CodeSandbox SDK lists the lower price for 2 vCPU and 4 GB: $0.15 / hour against $0.24 / hour.** Here is where they differ, from each one's own pages, plus a third option if neither fits.

## The short answer

The CodeSandbox SDK runs microVM sandboxes. Together AI now offers it as Together Code Sandbox and calls the old SDK legacy. Modal is a serverless compute platform; Modal Sandboxes run untrusted code in containers started from its SDKs.

### Pick CodeSandbox SDK if you want

- a lower list price for 2 vCPU and 4 GB: $0.15 / hour against $0.24 / hour
- isolation: microVM (Modal: gVisor by default; a VM runtime as an option)
- longest session: Runs until stopped, unless a ttl is set (Modal: 24 hours)

### Pick Modal if you want

- pause keeps memory: No pause; memory snapshots are experimental, which CodeSandbox SDK's pages do not state
- fork and snapshots: Filesystem and memory snapshots (memory in alpha), which CodeSandbox SDK's pages do not state
- GPUs: Yes, T4 to H100 and up, which CodeSandbox SDK's pages do not state
- SDK languages: Python, JavaScript and Go (CodeSandbox SDK: Python and TypeScript)
- security report: SOC 2 Type II, which CodeSandbox SDK's pages do not state

### Or Groundbox if you want

- a lower list price than both: $0.08 / hour
- CI runners too: yes, on the same key and bill

Where CodeSandbox SDK or Modal is ahead of Groundbox: longest session, GPUs, SDK languages, security report.

## Side by side

| Feature | CodeSandbox SDK | Modal | Groundbox |
| --- | --- | --- | --- |
| Price, 2 vCPU · 4 GB | [$0.15 / hour](https://www.together.ai/pricing) | [$0.24 / hour](https://modal.com/pricing) | $0.08 / hour |
| Pause keeps memory | Not published | [No pause; memory snapshots are experimental](https://modal.com/docs/guide/sandbox-snapshots) | Yes, memory and disk |
| CI runners too | [No: the pricing page lists Code Sandbox and Code Interpreter only](https://www.together.ai/pricing) | [No: the pricing page lists no CI runners](https://modal.com/pricing) | Yes, on the same key and bill |
| Isolation | [microVM](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | [gVisor by default; a VM runtime as an option](https://modal.com/docs/guide/sandboxes) | Firecracker VM |
| Fork and snapshots | Not published | [Filesystem and memory snapshots (memory in alpha)](https://modal.com/docs/guide/sandbox-snapshots) | Fork a running sandbox; save points |
| Longest session | [Runs until stopped, unless a ttl is set](https://docs.together.ai/docs/together-code-sandbox.md) | [24 hours](https://modal.com/docs/guide/sandboxes) | 720 hours, renewable |
| Self-host | Not published | Not published | No |
| GPUs | Not published | [Yes, T4 to H100 and up](https://modal.com/pricing) | Not offered |
| Largest size | [16 cores](https://docs.together.ai/docs/together-code-sandbox.md) | Not published | 16 vCPU |
| SDK languages | [Python and TypeScript](https://docs.together.ai/docs/together-code-sandbox.md) | [Python, JavaScript and Go](https://modal.com/docs/guide/sandboxes) | TypeScript and Python |
| Security report | Not published | [SOC 2 Type II](https://modal.com/docs/guide/security) | No SOC 2 report |
| Free to start | [Legacy SDK: a free Build plan](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | [$30 of credit a month](https://modal.com/pricing) | $5 of usage, no card |
| Plans | [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) | [Starter $0 plus compute with $30 / month of credit; Team $250 / month plus compute](https://modal.com/pricing) | Free: everything, with $5 of usage. $20 / month: $20 of usage included, then pay as you go |
| CPU | [$0.0446 per vCPU-hour (Together)](https://www.together.ai/pricing) | [Sandboxes: $0.00003942 per physical core per second; a core is 2 vCPU](https://modal.com/pricing) | $0.04 per vCPU-hour, a dedicated core |
| Memory | [$0.0149 per GiB-hour (Together)](https://www.together.ai/pricing) | [Sandboxes: $0.00000667 per GiB-second](https://modal.com/pricing) | Included, up to 4 GB per vCPU |
| Billing | [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, on the greater of requested and used CPU and memory](https://modal.com/pricing) | Per second, no minimum |
| Sizes | [New SDK: 0.1 to 16 cores, 1 to 8 GB per CPU](https://docs.together.ai/docs/together-code-sandbox.md) | Not published | 1 to 16 vCPU, up to 4 GB per vCPU |
| Sandboxes at once | [Legacy SDK: 10 on Build, 250 on Scale](https://docs.together.ai/docs/together-code-sandbox-legacy.md) | [Plan container limits: 100 on Starter, 5,000 on Team](https://modal.com/pricing) | 20 once a card is on file |
| Egress controls | Not published | [Block all, a CIDR allowlist, or a domain allowlist (beta)](https://modal.com/docs/guide/sandbox-networking) | 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 CodeSandbox SDK](https://groundbox.dev/compare/codesandbox) and [Groundbox vs Modal](https://groundbox.dev/compare/modal). Every other comparison is on [/compare](https://groundbox.dev/compare).

## Sources

### 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

### Modal

- [Modal pricing](https://modal.com/pricing), checked 2026-11-20
- [Modal docs: sandboxes](https://modal.com/docs/guide/sandboxes), checked 2026-11-19
- [Modal docs: sandbox resources](https://modal.com/docs/guide/sandbox-resources), checked 2026-11-19
- [Modal docs: sandbox snapshots](https://modal.com/docs/guide/sandbox-snapshots), checked 2026-11-20
- [Modal docs: sandbox networking](https://modal.com/docs/guide/sandbox-networking), checked 2026-11-19
- [Modal docs: security](https://modal.com/docs/guide/security), checked 2026-11-19

## Try the third option free.

[Start free, no card](https://groundbox.dev/signup)[Groundbox vs CodeSandbox SDK](https://groundbox.dev/compare/codesandbox)
