Modal pricing for AI sandboxes: requests, usage and monthly cost
Modal Sandbox pricing depends on the greater of requested and actual CPU and memory use. CPU and memory use the non-preemptible Sandbox rates, not the default Function rates. A fixed request of one physical core and 4 GiB costs $0.23796 per hour; an agent with lower requests and lower average use can cost much less. Modal pricing, resource billing
This guide covers sandbox execution. A complete Modal application may also use Functions, GPUs, storage and model endpoints with different terms. We build Lizard and include it in the comparison. Prices checked on 4 November 2026; the workloads below are assumptions, not measurements.
Use the Sandbox rates
| Resource | Per second | Per hour |
|---|---|---|
| CPU, one physical core | $0.00003942 | $0.141912 |
| Memory, one GiB | $0.00000667 | $0.024012 |
Modal describes a physical core as equivalent to two vCPUs. Setting cpu=2 requests two physical cores, so it is not the same CPU request as a typical 2-vCPU comparison. Sandbox CPU and memory prices include the non-preemptible premium. Do not add that multiplier again. Modal Sandbox prices
The resource floor matters as much as the rate. Modal's default request is 0.125 CPU cores and 128 MiB of memory. It can burst above that request when capacity permits, up to any configured limits. Billing follows the higher of the request and use for each resource. Requests and limits
A fixed reservation and an elastic agent have different bills
Consider two ways to run an agent. Both use the listed base pricing without a region surcharge, GPU or other resource charges.
Example A: reserve the full machine size
Request one physical core and 4 GiB for the whole hour. Keep actual use within that reservation. The hourly calculation is:
1 × 0.141912 + 4 × 0.024012 = 0.23796That is $0.23796 an hour and $237.96 for 1,000 aggregate hours before eligible compute credit. Waiting on a model does not remove a reservation. This example fits a workload that needs those resources available throughout its run.
Example B: use a small request and measure demand
Now assume the per-second billable CPU, after the request floor, averages 0.2 physical cores. Assume billable memory averages 0.5 GiB. These are averages of max(request, actual) for each resource, not just the average process readings.
0.2 × 0.141912 + 0.5 × 0.024012 = 0.0403884The estimate is $0.0403884 an hour, or $40.3884 for 1,000 aggregate hours before eligible credit. It describes less billed resource use than Example A. It does not show equal guaranteed capacity at a lower price.
A low request also changes the runtime trade-off. Check CPU pressure and exit reasons, including memory-related evictions. Increase the request if the workload cannot tolerate the observed behavior. Modal sizing guidance
Apply the monthly compute allowance once
Modal Starter has no monthly subscription fee and includes $30 of compute each month. Team costs $250 a month and includes $100 of compute. The included amount covers eligible compute; Shared Endpoint token charges have different terms. Plan and credit terms
For a Starter workspace whose compute allowance is unused elsewhere:
| Aggregate hours | Fixed request: one core, 4 GiB | Elastic assumption: 0.2 cores, 0.5 GiB |
|---|---|---|
| 10 | $0.00 | $0.00 |
| 100 | $0.00 | $0.00 |
| 1,000 | $207.96 | $10.3884 |
Each subtotal uses max(0, compute usage - 30). The table excludes model tokens, storage, traffic, region charges and tax differences. Keep developer seats and effective concurrency within Starter limits; the price page lists three seats and 100 concurrent containers. Check your workspace's effective Sandbox limits before a large launch.
The allowance belongs to the workspace. If another workload already consumed it, this task does not get a second allowance. Team's fee is also not a deposit equal to its compute credit: for the fixed-request example, 250 + (237.96 - 100) gives a $387.96 compute-and-plan subtotal.
Compare Modal with Lizard using the same constraints
Lizard Small supplies a fixed 2 vCPU, 4 GB of RAM and 5 GB of local disk at $0.0162 per running hour. Base Pro costs $19 a month and includes $19 of usage. For 1,000 aggregate hours on an otherwise unused account, compute uses $16.20 and the plan subtotal is $19. Lizard pricing
In the fixed-reservation comparison, that is below Modal Starter's $207.96 subtotal. In the lower-use example, Modal's $10.3884 subtotal is below Lizard's monthly minimum. The correct choice depends on the workload's billable resource use, required guarantees and other account usage.
This is not a universal savings claim. Modal and Lizard use different CPU and memory units and different allocation models. Actual duration, available capacity and retry rate can change the result. Measure the same acceptance task on both before using equal duration in a forecast.
Lizard runs CPU sandboxes in Firecracker microVMs and offers fixed Small, Medium and Large sizes. It has no GPU option. Modal may fit better when the application needs GPUs, elastic resources or other Modal services around the sandbox. Lizard sizes and lifecycle, Modal resources
Budget for more than CPU and RAM
Region selection can add a multiplier: Modal lists 1.15× for broad placement and 1.75× for narrow placement. These examples leave placement unpinned. Use the region policy your application requires when estimating its bill. Modal regions
Volume storage and outbound transfer have separate allowances and rates. They also use GiB and TiB units. Check whether a retained snapshot or dataset falls under the relevant storage class; a compute allowance does not establish free storage. Modal storage pricing, network billing
A sandbox can also outlive the command you started. Record its lifecycle and terminate it when the task finishes. If you need state later, choose an explicit storage or snapshot path and include retention in the estimate. Memory snapshots and filesystem snapshots have different behavior and retention rules. Modal snapshots
GPU Sandboxes require the gVisor runtime and can be preempted. Add the selected GPU's rate and design a recovery path. The CPU-only calculations in this guide do not price GPU work. GPU Sandbox constraints
Measure the billable workload
Run a representative task with the resource request and limit you plan to deploy. Record the sandbox's full lifetime, CPU and memory metrics, failures, retries and final output. Compare a smaller request with a larger one only if both complete the same acceptance check.
For a rough estimate, multiply aggregate running hours by average billable resource use and the published rates. For a closer estimate, account for the request floor in each billing interval. Applying max only after averaging can understate the charge when use crosses the request during a run.
Keep the model bill separate from the sandbox bill. A slow or repeatedly failing job may spend more on model calls even if its compute charge is small. Compare cost per successful task as well as the invoice subtotal.
Why is Modal Sandbox pricing higher than Function pricing? CPU Sandboxes use non-preemptible CPU and memory rates. The default Function rates describe a different execution policy, so copying them into a sandbox estimate understates the rate.
Does idle mean free? A live sandbox still has a requested-resource floor. Low actual use can reduce the charge only above that floor. Ending the sandbox stops its runtime; storage can remain.
Is Modal cheaper than Lizard? It can be for small workloads covered by recurring credit or for the lower-use example above. Lizard has a lower fixed running rate for the reference allocation, with a monthly plan minimum. The broader sandbox comparison puts both billing models beside other options.
Build with AI. Ship with Lizard.
You don't need a platform team to go live. Your whole cloud, one CLI command away.
- Services
- —
- Add-ons
- —
- Deployments
- —
- Sandbox starts
- —