# Cloudflare Sandbox vs Blaxel: pricing, idle costs and limits Runtime Cloud (withruntime.com) costs $0.64 for the test job. Cloudflare bills active CPU. Blaxel bills only memory. ## Which is better, Cloudflare Sandbox or Blaxel? It depends on where your code runs and how long sandboxes sit idle. For agents that mostly wait on a model, Runtime has the lowest bill at any load: $0.64 for the test job, against $1.35 on Cloudflare and $3.45 on Blaxel. CPU and memory are priced separately. Pick Cloudflare Sandbox for sandboxes inside a Workers app, near users. Pick Blaxel for a resume in about 25 ms, or for over 100,000 sandboxes running at the same time on its top tier. ## At a glance Cloudflare prices its Sandbox SDK as Cloudflare Containers, so those are the rates shown. | | Cloudflare Sandbox SDK | Blaxel | Runtime | | -------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | | Isolation | A container in its own VM | Lightweight virtual machines | Firecracker microVM, own kernel | | CPU | $0.072 per active vCPU-hour, metered in 10 ms steps | Included with memory; 8 GB gets 4 cores | $0.025 per vCPU-hour of measured CPU, with a small floor | | Memory | $0.009 per provisioned GiB-hour; at least 3 GiB per vCPU | $0.0000115 per GB-second of active time | $0.0075 per reserved GiB-hour | | Idle | Filesystem-only snapshots; processes restart | Standby about 15 s after connections close | Pause keeps files, memory and processes while you have credit | | Kept when idle | Saved filesystem snapshots; memory is not kept | Files and running processes, in a snapshot | Files, memory and running processes | | Idle storage | None kept | $0.20 per GB-month of snapshot | $0.08 per GB-month | | Plan fee | Workers Paid, at least $5 a month | None; tiers grow with credit added | None; prepaid credit from $10 | | Free start | No free tier; the plan includes 375 vCPU-minutes a month | Up to $200 of credit | 100 free hours of a 1 GB machine in the first 30 days, no card | | Interfaces | A TypeScript SDK called from a Cloudflare Worker | TypeScript and Python SDKs | API, CLI, MCP server, JavaScript and Python SDKs | ## What does each one charge while the agent is idle? This is where the two differ most. A Blaxel sandbox goes to standby about 15 seconds after its last connection closes. In standby, Blaxel charges nothing for memory, only for the snapshot's storage. Reconnecting resumes the sandbox in under 25 ms, with its files and running processes. Blaxel's docs note that external connections, such as database connections or HTTP pools, are not kept. A Cloudflare sandbox that is not destroyed stays up, billing its provisioned memory and disk, until it has been idle for 10 minutes by default. Those ten minutes cost $9.50 per 1,000 sandboxes at the 2 vCPU, 6 GiB, 12 GB size below. That is several times the cost of the job itself. This describes the 0.x SDK's default idle wait. Current public-beta filesystem snapshots preserve saved files, but memory and processes restart. Destroy each sandbox when its run ends to avoid paying for the idle interval. On Runtime, stop a sandbox when its run ends. Or set `idlePauseSeconds` so it pauses by itself and wakes on the next request, with memory and processes intact: ```ts check import { Sandbox } from "withruntime"; const sbx = await Sandbox.create({ idlePauseSeconds: 600 }); // ten idle minutes await sbx.update({ idlePauseSeconds: 1800 }); // change it later; 0 turns it off ``` ```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() ``` ## Cost for the same job The sums below price 1,000 runs of 60 seconds on 2 vCPU, each with 20 CPU-seconds of real work. Blaxel gets 4 GB and Runtime gets 4 GiB. Cloudflare asks for at least 3 GiB per vCPU, so it is sized at 6 GiB, with the 12 GB of disk from Cloudflare's own example. ``` Cloudflare CPU 1,000 × 20 s × $0.000020 = $0.40 Memory 1,000 × 60 s × 6 × $0.0000025 = $0.90 Disk 1,000 × 60 s × 12 × $0.00000007 = $0.05 Total $1.35 Blaxel Memory 1,000 × 75 s × 4 × $0.0000115 = $3.45 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 ``` Across 100,000 runs in a month, the bills are $135.04 on Cloudflare, $345.00 on Blaxel and $63.89 on Runtime. When both CPUs are busy for the whole minute, the job costs $1.33 on Runtime, $3.35 on Cloudflare and $3.45 on Blaxel. Between the two rivals, Cloudflare is cheaper even with both CPUs busy. Its CPU is metered, while Blaxel's is bundled into a flat memory rate. The Cloudflare total assumes each sandbox is destroyed at the end of its run. The Blaxel total includes the 15 seconds or so each sandbox stays billed after its run, before standby: $0.69 per 1,000 runs. Not counted: plan fees, Workers requests, Durable Object time, storage, network and free credit. ## Which one to pick | If what matters most is | Choose | | ------------------------------------------------- | ------------------ | | Sandboxes inside a Workers app, near users | Cloudflare Sandbox | | Free idle time and a resume in about 25 ms | Blaxel | | Over 100,000 sandboxes at the same time, top tier | Blaxel | | The lowest bill of the three at any load | Runtime | Runtime also keeps a paused sandbox's memory for $0.08 per GB-month. Its API works from any backend, not only from inside a Worker. ## Porting from each Cloudflare 0.x code maps call for call: `getSandbox(env.Sandbox, name)` to `Sandbox.getOrCreate(name)`, `sandbox.exec(cmd)` to `exec`, and `proxyToSandbox` to `box.previews.create(port)`. Blaxel's standby has a direct counterpart in Runtime's automatic wake, which is on by default, so a request to a paused sandbox brings it back. Blaxel code can keep its calls. Import `SandboxInstance` from `withruntime/blaxel` (Python `withruntime.blaxel`). Ported to Runtime's own SDK, its create, run, file and delete calls become `Sandbox.create()`, `exec`, `files.write` and `files.read`, and `stop()`. The [migration](/docs/migrate) guide gives one instruction for a coding agent that ports the project on a branch and checks it without credit. Coming from Cloudflare or Blaxel, credit you add within 30 days of signing up is matched, up to $1,000 in total. Longer reads: [Runtime vs Cloudflare](/docs/cloudflare-sandbox-alternative), [Runtime vs Blaxel](/docs/blaxel-alternative) and [how to pause and resume a sandbox](/how-to/pause-and-resume-a-sandbox). ## Runtime Cloud For an agent that waits on a model, Runtime costs 53% less than Cloudflare and 81% less than Blaxel. The test job, 1,000 one-minute runs at 2 vCPU, costs $1.35 on Cloudflare, $3.45 on Blaxel and $0.64 on Runtime. Cloudflare ties memory to vCPUs, and Blaxel ties CPU to memory. Runtime prices the two separately, at $0.025 per measured vCPU-hour and $0.0075 per GiB-hour, so neither raises the other. Rates checked 25 October 2026. Start free from any backend with `npx withruntime login`. The [migration guide](/docs/migrate) covers code written for Cloudflare's SDK or Blaxel's. ## Sources Cloudflare rates checked 25 October 2026 and its sandbox lifecycle page read 26 October 2026. Blaxel rates checked 25 October 2026, with its pricing page and sandbox documentation. Cloudflare's snapshot behavior checked 27 October 2026. - [Cloudflare sandbox lifetime](https://developers.cloudflare.com/sandbox/concepts/lifetime/) - [Cloudflare Containers pricing](https://developers.cloudflare.com/containers/pricing/), [Containers limits and instance types](https://developers.cloudflare.com/containers/platform/limits/), [Sandbox lifecycle](https://developers.cloudflare.com/sandbox/concepts/sandboxes/) - [Blaxel pricing](https://blaxel.ai/pricing), [Blaxel sandboxes](https://docs.blaxel.ai/Sandboxes/Overview) - Runtime [pricing](/docs/pricing) Facts on this page were checked on 27 October 2026.