Stable Diffusion 3.5, FLUX and Midjourney: API vs GPU
The bottom line: Hosted APIs make life easy when you only need occasional image batches, but once a project gains traction, most of us start eyeing rented GPUs with a gleam in our eye. The math looks obvious: why pay five cents to a hosted provider when you could rent an RTX 4090 on RunPod for under a dollar an hour and generate thousands of images for pocket change?
The catch is that open weights are free to download, but the compute, persistent storage, cold starts, and maintenance hours needed to run them are not. The real crossover point between hosted APIs and self-hosting depends far more on your batch volume, pipeline idle time, and candidate rejection rate than on the raw speed of any individual GPU. My practical rule of thumb: if your volume is spiky or still unproven, start hosted and let the numbers earn you a GPU.
Rates verified late 2026 against official provider documentation. All dollar amounts in USD before applicable taxes. Throughput, acceptance, overhead, and maintenance labor below are explicit scenario inputs rather than vendor benchmarks.
Choose a deployment and a license together
Before you start counting GPU hours, take a look at the legal terms of the weights you want to deploy. Stable Diffusion 3.5 offers freely downloadable checkpoints, but its Community license comes with clear eligibility conditions, including an annual revenue ceiling. If your business crosses that threshold or offers downstream generation services, you'll need to budget for commercial Enterprise terms. A free community license also doesn't make compute, storage, or DevOps time free.
FLUX is a whole family of models with distinct commercial boundaries, not one monolithic checkpoint. Black Forest Labs' licensing page separates internal marketing use from customer-facing SaaS platforms and agency work. Their entry-level Builder tier is explicitly not intended for downstream client applications. So confirm the exact model weights, deployment architecture, and licensing rights before assuming self-hosting is free.
Midjourney is a different animal: a closed creative subscription. Its plan comparison lists monthly Basic ($10), Standard ($30), Pro ($60), and Mega ($120). Standard and higher include unlimited Relax mode generations, while Pro and Mega add private Stealth generation. These are managed creative suites for human artists, not developer endpoints you can wire into an automated customer-facing product.
Dedicated and serverless bills behave differently
On the GPU side, providers bill dedicated instances and serverless workers quite differently. The Runpod price page lists a dedicated RTX 4090 Pod at $0.89/hour, alongside a Serverless 4090 endpoint at $1.10/hour. Availability, network bandwidth, and regional pricing vary, so check local inventory before you spin anything up.
Serverless billing charges you for active worker execution, cold-start initialization, and brief idle timeouts, rounded to the second. When traffic drops to zero, your compute bill stops right away, though persistent network storage remains chargeable. A dedicated Pod, on the other hand, ticks away 24/7. If you leave a dedicated 4090 running all month and only send it jobs for four hours a day, multiplying its hourly rate by your actual usage is wishful thinking: you still owe the provider for every idle second.
For this comparison, we assume a standard 100 GB network volume attached at $0.07/GB/month, totaling $7. If your stack needs multi-model caching, larger SSD volumes, container registries, or automated backups, budget those separately.
Two workloads and two assumed speeds
Nobody gets a 100% keeper rate in generative image production. We assume a common commercial ratio of two generated candidates per accepted keeper: delivering 1,000 accepted images requires 2,000 generations, while delivering 20,000 accepted images requires 40,000 generations.
We test two operational profiles: a fast, optimized profile generating 360 raw images per hour (~10 seconds per image), and a heavier, multi-step or higher-resolution profile generating 150 images per hour (~24 seconds per image).
For serverless execution, we apply a 1.25x multiplier to pure generation time to cover worker spin-up, model loading, and queuing overhead, then add the fixed $7 network storage. We value recurring maintenance and DevOps upkeep at two hours monthly at $50/hour ($100). For a dedicated 24/7 Pod, a typical 730-hour month incurs three maintenance hours valued at $150.
| Deployment scenario | 1,000 accepted: provider usage | Including maintenance time | 20,000 accepted: provider usage | Including maintenance time |
|---|---|---|---|---|
| 24/7 Pod, $0.89/hour | $656.70 | $806.70 | $656.70 | $806.70 |
| Serverless, fast assumed profile | $14.64 | $114.64 | $159.78 | $259.78 |
| Serverless, heavy assumed profile | $25.33 | $125.33 | $373.67 | $473.67 |
Here's where the economics split. At 1,000 accepted images, fast serverless compute comes out to (2,000 ÷ 360) × 1.25 × $1.10 + $7 = $14.64. Even adding $100 in maintenance labor brings the total to $114.64. A dedicated 24/7 Pod, by contrast, burns 730 × $0.89 + $7 = $656.70 whether you generate a thousand images or none at all. With maintenance, it hits $806.70.
At 20,000 accepted images, the heavy serverless profile requires roughly 266.67 pure generation hours, pushing serverless provider fees to $373.67 ($473.67 with maintenance). Meanwhile, that dedicated Pod ($656.70 usage, $806.70 all-in) starts to look competitive, provided your queue doesn't spike beyond what a single card can handle. A fixed Pod that runs out of VRAM or stalls on a traffic burst creates customer drop-off that no cost spreadsheet will capture.
Compare with an actual hosted-image quote
Now let's put those self-hosted numbers up against a direct API quote. Black Forest Labs' pricing calculator lists FLUX 3 Image Klein 1K at $0.009 per generated image. At our baseline of two candidates per approval, hosted Klein costs exactly $18 for 1,000 accepted images, or $360 for 20,000 approved images. Flagship FLUX 3 Image 1K at $0.048 per image costs $96 for 1,000 accepted assets, or $1,920 for 20,000.
One caution: don't assume equal pixel counts mean equal quality. A hosted model and a quantized local checkpoint may share an architecture, but differences in sampler implementations, safety filters, and precision can change prompt adherence. Run a side-by-side test with your exact brief to verify candidate ratios and human QA time.
The fast serverless scenario beats Klein at 20,000 approvals only before additional license and operational costs, and only if its assumed speed and acceptance hold. Under the heavier profile, serverless self-hosting actually costs more than hosted Klein once that modest $100 maintenance overhead is included. That reversal is why "self-hosting is always cheaper at scale" misleads so many engineering teams.
An explicit break-even equation
Here's the math for finding your own break-even point. Under our fast serverless profile, the variable compute cost per raw generated image is $1.10 × 1.25 ÷ 360 = about $0.003819.
Comparing that against the $0.009 hosted API rate gives an infrastructure margin of $0.009 − $0.003819 = $0.005181 saved per raw generation. To recover the $107 in fixed monthly overhead ($7 storage + $100 maintenance labor), you need to generate:
$107 ÷ $0.005181 = 20,655 raw images
At two candidates per accepted deliverable, that equals exactly 10,328 approved images. You round up because fractional generations can't close an invoice gap.
Any monthly license fee you owe adds to that $107 fixed amount. Divide the new fixed total by ($0.009 − variable compute per raw image). If your local variable compute cost exceeds the hosted API price, no amount of volume will make self-hosting pay off. And if your acceptance rate differs from ours, compare cost per approved image instead of raw renders.
What we would test before renting for a month
Before you commit budget to a monthly GPU contract, benchmark your real workflow: the specific checkpoint, float precision (fp8 vs fp16), resolution, and batch size. Measure cold-start latency, memory overhead, failed generations, and queue behavior during peak bursts.
For low, sporadic, or unpredictable workloads, hosted APIs are almost always the smarter, cheaper choice, unless strict data privacy or custom LoRA requirements call for an isolated environment. Use serverless workers for scheduled batch runs, since they shut down when idle. Only lock in dedicated 24/7 instances when steady production volume keeps utilization high across all 730 hours of the month. In real-world production, that last condition is the one teams most often overestimate. For a deeper breakdown of candidate rejection math and resolution tiers, see our FLUX image budget guide.