Replicate, fal or Modal: Image API vs Custom GPU Costs
The short answer: all three bill by the second of GPU time, but at different rates and, for managed endpoints like Replicate and fal, in different units you actually see on the invoice. If you only need a few thousand image generations for a prototype, spinning up your own custom GPU container is like buying a semi-truck to pick up groceries. A managed endpoint gets you running in five minutes. Once your product scales to hundreds of thousands or millions of runs, though, the economics flip. In our realistic first-month benchmark before provider allowances, 10,000 outputs come out to $30 on either managed service, compared to $714.29 when you factor in custom container runtime, persistent storage, and developer setup time. Jump to 1M outputs and the picture inverts: managed endpoints total $3,000, while self-hosted Modal infrastructure plus maintenance drops to $1,950.71. That crossover point hinges almost entirely on how fast your model actually runs and whether you have free credits left.
My practical rule of thumb: if you're still figuring out whether anyone wants your product, pay the managed premium and keep your attention on the product. Once your volume is steady and predictable, the math starts to favor owning the stack.
Prices checked 25 October 2026, USD before tax. These numbers represent realistic deployment budgets, not hands-on performance results or a claim that every provider serves on identical physical silicon.
Define the model and the unit before comparing hosts
To compare apples to apples, our reference model family is FLUX.1 schnell running a standard four-step generation workflow. Replicate's official endpoint charges a flat $3 per thousand output images. Over at fal's endpoint, the meter runs at $0.003 per megapixel, rounded up to the nearest billing megapixel.
For standard square drafts, that means one Replicate output equals one billed fal megapixel per candidate. The units stop being interchangeable once you move beyond standard resolutions, though: a two-billed-megapixel fal candidate immediately jumps to $0.006. Always check your image dimensions and batch settings before assuming the $0.003 row applies to your pipeline. An API's approximate resolution setting also might not give you the identical pixel count or numerical results you'd get inside your own PyTorch container.
Replicate packages an Apache 2.0 checkpoint behind a heavily optimized serving path. Reusing that same checkpoint in a private container doesn't automatically match their proprietary latency or throughput. And please don't guess a managed platform's underlying GPU model from standard public container rates. It's a tempting shortcut, and it usually leads somewhere wrong.
Custom serving has more than a GPU charge
When you deploy custom containers, compute is only part of the monthly invoice. Modal pricing bills an A100 80GB at $0.000694 per GPU-second, physical CPU cores at $0.0000131 per core-second, and system host memory at $0.00000222 per GiB-second. Pairing one physical CPU core and 32GiB of host RAM with that A100 gives you:
Combined runtime rate = $0.000694 + $0.0000131 + 32 × $0.00000222 = $0.00077814/second.
Our production baseline models 1.5 seconds per generation attempt, a realistic 3% buffer for discarded or retried generations, and one three-second cold start per 50 successful outputs (a 2% cold-start frequency). Treat these as sensitivity parameters, not an SLA guarantee from Modal. We assume no warm-idle padding in the base comparison, though real production traffic spikes often bring some idle container overlap.
Billed runtime seconds = outputs × (1.5 × 1.03 + 0.02 × 3) = outputs × 1.605 seconds. The gross scenario adds 20GiB-month of persistent volume storage at $0.09/GiB-month ($1.80), assuming included tier limits have been consumed. Network transfer is billed separately: add standard egress once you exhaust your plan allowance. For instance, 100 extra billable GiB at $0.04/GiB adds $4.00.
Infrastructure and engineering are separate columns
Running your own setup takes real human effort. We factor in an initial five hours of container engineering and two hours of monthly ops maintenance, conservatively valued at $100/hour: that is $700 of engineering time in month one. Core application logic and quality review are excluded because you have to build those regardless of where the model runs. Managed APIs don't eliminate product engineering either.
| Successful output target | Managed example usage | Gross custom runtime + storage | Gross custom + first-month time value |
|---|---|---|---|
| 10,000 | $30.00 | $14.29 | $714.29 |
| 1,000,000 | $3,000.00 | $1,250.71 | $1,950.71 |
That right-hand column represents true economic investment, not an invoice Modal mails to your office. If you hire a contractor, it's cash out the door; if your team builds it in-house, it's engineering time pulled away from your core product. Also remember that these numbers count technically successful HTTP responses, not whether your creative director liked the output.
Neither managed API row includes promotional compute credits in this baseline. It's worth checking how each provider handles 5xx server errors versus outputs you simply decide to discard, because bad generations that complete successfully are still billable candidates.
Apply remaining included usage before estimating cash
Here's the good news for early-stage builders: Modal's pricing page provides $30/month of compute on Starter along with 1TiB/month of volume storage. The practical catch is that the compute allowance covers Functions' CPU, memory and GPU time, and does not cover token-billed Shared Endpoints. Our custom container runs entirely as a Function, so it qualifies.
If you have your full monthly allowance available, the 20GiB volume storage costs $0.00. Your out-of-pocket compute spend drops to $0.00 at 10,000 outputs and $1,218.91 at 1M (calculated as max(0, gross compute − remaining compute credit)). Network egress and extra storage attach separately. Keep in mind this credit is shared across the workspace, so you can't duplicate the $30 grant across separate microservices. The $700 engineering allocation remains an internal cost.
Our side-by-side comparison keeps an exhausted-allowance scenario so you can see the raw unit economics. As Modal's billing documentation highlights, gross resource utilization and net invoices after credits tell two different stories, so it helps to look at both.
How much does the speed assumption matter?
If your custom container takes 3.0 seconds per generation instead of 1.5, the same retries and container spin-ups push monthly compute and storage to $2,452.94 at 1M outputs, or $3,152.94 once you add first-month engineering. Suddenly the financial advantage over a $3,000 managed API bill practically evaporates. In real-world production, this is the number I'd stress-test first, because a model that's twice as slow can quietly erase the whole savings story.
At our baseline 1.5-second runtime, the first-month gross crossover point with zero remaining allowances sits at roughly 400,781 outputs: ($700 engineering + $1.80 storage) / ($0.003 managed − $0.0012489147 custom variable cost). This break-even point is tied strictly to our defined workload. Available credits shift the math in your favor, while ongoing monthly maintenance never drops completely to zero.
Traffic volatility moves the needle too. If cold starts climb from 2% to 10% during spiky daytime traffic, that adds $186.75 across 1M requests. Holding containers warm during traffic lulls adds up as well: ten hours of warm-idle capacity at our combined rate adds $28.01. I'd be skeptical of any promise of magical instant scale-to-zero until you've measured real cold starts yourself.
Our recommendation: start on a managed endpoint like Replicate or fal while your volume is low and your team is focused on product-market fit. Move to custom serving on Modal once your generation volume reliably exceeds 400,000 monthly images, or when you need tight control over custom LoRAs, proprietary weights, and dedicated serving hardware. If it's only a nice-to-have optimization, save your engineering hours for something your users will actually notice.