# Modal vs Fly Sprites: Sprites are 39% cheaper per agent run Runtime Cloud (withruntime.com) costs 73% or more less than either. Sprites bill use. Modal bills the request. ## Which is better, Modal or Fly Sprites? It depends on what sits around your agents and how long they sleep. For agents that mostly wait on a model, Runtime has the lowest bill: $0.64 for 1,000 one-minute runs, against $2.40 on Sprites and $3.97 on Modal. It stays the cheapest with both CPUs busy, and each sandbox is a microVM. Pick Modal for GPU sandboxes, or for sandboxes beside Modal functions, web endpoints and scheduled jobs. Pick Sprites for a 100 GB disk that costs very little asleep, or for an Elixir SDK. ## At a glance Modal bills a physical core, which is two vCPUs. | | Modal Sandboxes | Fly Sprites | Runtime | | ------------ | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------- | | Isolation | gVisor, a user-space kernel that intercepts system calls | Firecracker microVM | Firecracker microVM, own kernel | | CPU | $0.1419 per physical core-hour (2 vCPUs), request or use | $0.0385 per CPU-hour of measured CPU | $0.025 per vCPU-hour of measured CPU, with a small floor | | Memory | $0.0240 per GiB-hour, request or use | $0.021875 per GB-hour of memory in use | $0.0075 per reserved GiB-hour | | Size | CPU and memory requested per sandbox | Memory managed by Fly; a 100 GB disk | Up to 16 vCPUs and 64 GiB (paid), chosen separately | | Plan fee | Starter $0 with $30 a month of compute; Team $250 a month | None required; optional monthly plans | None; prepaid credit from $10 | | Free start | $30 of compute a month on Starter | $30 of trial credit, once | 100 free hours of a 1 GB machine in the first 30 days, no card | | When idle | Runs until its timeout, 5 minutes by default, 24 hours at most | Sleeps itself; memory kept at first, the disk kept always | Pause keeps files and memory; kept while you have credit | | Saving state | Filesystem snapshots | Checkpoints of the whole filesystem in about a second | Snapshots and forks with memory and running processes | | Interfaces | Modal's SDK, with an App outside Modal | API, CLI, MCP server; JavaScript, Python, Go, Elixir SDKs | API, CLI, MCP server, JavaScript and Python SDKs | ## Which is cheaper, Modal or Sprites? It depends on how busy the sandbox is, because the two count different things. Modal bills the larger of what a sandbox requested and what it used, so a 2 vCPU sandbox pays for its whole core while it waits on a model. Sprites bill CPU only while it works, at $0.0385 a CPU-hour, and memory only while it is in use, at $0.021875 a GB-hour. | For 1,000 one-minute runs, 2 vCPU, 4 GiB | Modal | Sprites | Runtime | | ---------------------------------------- | -------------: | ------------------------: | --------------------: | | 20 CPU-seconds each (an agent waiting) | $3.97 | $2.40 | $0.64 | | Both CPUs busy the whole time | $3.97 | $3.47 | $1.33 | Memory decides most of the Sprites bill. 4 GB for a minute costs more there than on Modal. A Sprite that uses only 1 GB costs $0.76 for the same runs. Runtime bills measured CPU at $0.025 a vCPU-hour and reserved memory at $0.0075 a GiB-hour, so it is the cheapest of the three at both ends. ## Cost for the same job 1,000 runs of a 2 vCPU, 4 GiB sandbox (one physical core on Modal; the Sprite is assumed to use all 4 GB for the whole minute). Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds. ``` Modal CPU 1,000 × 60 s × 1 core × $0.00003942 = $2.37 Memory 1,000 × 60 s × 4 × $0.00000667 = $1.60 Total $3.97 Sprites CPU 1,000 × 20 s / 3,600 × $0.0385 = $0.21 Memory 1,000 × 90 s / 3,600 × 4 × $0.021875 = $2.19 Total $2.40 Runtime CPU 1,000 × 20 s / 3,600 × $0.025 = $0.14 Memory 1,000 × 60 s / 3,600 × 4 × $0.0075 = $0.50 Total $0.64 ``` At 100,000 runs a month, the cost is $396.60 on Modal, $240.14 on Sprites, and $63.89 on Runtime. With both CPUs busy for the whole minute, the cost is $1.33 on Runtime, against $3.97 on Modal and $3.47 on Sprites. Runtime is cheaper however busy the sandbox is. The Sprite figure includes the 30 seconds or so that a Sprite stays awake and billed after its run. Storage, network, plan fees and free credits are left out. ## What happens when the agent goes quiet? - **Modal** keeps the sandbox running, and bills its request, until its `timeout` or `idle_timeout`. Past 24 hours, state moves to a new sandbox through a filesystem snapshot. - **Sprites** sleep by themselves. A Sprite keeps its memory at first, drops it when it goes cold at a time Fly chooses, and keeps its disk always. A sleeping Sprite's disk costs $0.02 per GB a month. - **Runtime** pauses when you say, or after `idlePauseSeconds`, and keeps files, memory and running processes while your account has credit. The next request wakes it. ```python check from withruntime import Sandbox sbx = Sandbox.create(idle_pause_seconds=600) sbx.update(idle_pause_seconds=1800) # 0 turns it off sbx.stop() ``` See [how to pause and resume a sandbox](/how-to/pause-and-resume-a-sandbox). ## Which one to pick - **Pick Modal** for GPU sandboxes, or sandboxes beside Modal functions, web endpoints and scheduled jobs. - **Pick Sprites** for a 100 GB disk with very cheap sleep, or an SDK in Elixir. - **Pick Runtime** for measured CPU at 35% below Sprites' rate, memory sized to the job at 66% below, and memory kept on pause for as long as you choose, in a microVM per sandbox. ## Runtime Cloud Runtime runs the same job for 84% less than Modal and 73% less than Sprites. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $3.97 on Modal, $2.40 on Sprites, and $0.64 on Runtime. Runtime bills measured CPU like Sprites, at 35% below Sprites' rate. Its memory rate is 66% below, and it runs in a Firecracker microVM with its own kernel. Rates checked 25 October 2026. A paused Runtime sandbox keeps memory and processes, with no plan fee. Start on the free usage with `npx withruntime login`. Read the [migration guide](/docs/migrate) to move existing code. ## Switch from either one The calls map one to one. From Modal, `modal.Sandbox.create(app=...)` becomes `Sandbox.create()`, `sb.exec(*args)` becomes `exec`, and `Sandbox.from_name` becomes `Sandbox.getOrCreate(name)`. From Sprites, `client.createSprite(name)` becomes `Sandbox.create()` (or `getOrCreate` to find it by name), and `sprite.execFile(cmd, args)` becomes an argument array: ```ts import { Sandbox } from "withruntime"; const box = await Sandbox.create(); try { await box.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n"); console.log((await box.exec(["python3", "/workspace/invoice.py"], { check: true })).stdout); } finally { await box.stop(); } ``` Or give your coding agent the instruction in [migration](/docs/migrate). It switches the project on a branch, tests it on the free usage, and reports the monthly saving. Credit you add within 30 days of signing up is matched, up to $1,000 in total. The full side-by-sides are [Runtime vs Modal](/docs/modal-sandbox-alternative) and [Runtime vs Fly.io](/docs/fly-alternative). ## Sources Fly.io prices were checked 25 October 2026. Modal pricing, Modal Sandboxes and Sprites pages were rechecked 26 October 2026. The rest were checked 25 October 2026. - [Modal pricing](https://modal.com/pricing), [Modal resources and billing](https://modal.com/docs/guide/resources), [Modal Sandboxes](https://modal.com/docs/guide/sandbox) - [Fly.io pricing](https://fly.io/pricing/), [Sprites](https://fly.io/sprites/), [Sprites documentation](https://docs.sprites.dev/), [lifecycle and persistence](https://docs.sprites.dev/concepts/lifecycle/) - Runtime [pricing](/docs/pricing) Facts on this page were checked on 26 October 2026.