// learn · ai-image-cost

AI Inference Cost: How Pricing Actually Works (Per Call vs Per Hour)

Per-call, per-second, and per-hour GPU pricing explained - how to model AI inference cost before you ship, including cold starts and hidden costs.

Published 2026-06-05ai inference costai model inferenceinference infrastructure

AI inference pricing seems simple until you try to model your costs before shipping. Per-call pricing, per-second billing, per-hour GPU rental, and token-based pricing are four different models that produce wildly different numbers at the same throughput. A team that ships without understanding which model applies to them regularly discovers they are spending 3–10x what they expected.

This guide explains how each pricing model works, what it means for image generation specifically, how to calculate total cost of ownership (including the costs that do not appear on the invoice), and how to pick the right model for your workload.

The Four AI Inference Pricing Models

1. Per-call (per-image) pricing

You pay a fixed price per API call, regardless of how long the inference takes. This is the simplest pricing model to reason about. "Background removal: $0.05 per image. 10,000 images = $500." Done.

Per-call pricing is common for managed pipeline APIs where the provider has optimized the inference path enough to offer a predictable margin. The risk is that the fixed price does not reflect actual compute: a slow run costs the same as a fast one from your perspective, but providers price these with margin built in. At high volume, per-second billing often becomes cheaper.

For example, Runflow prices per pipeline execution: a single call that runs background removal, then upscaling, then format conversion counts as one billable unit, not three separate API calls. This makes multi-step pipelines predictable to price in a way that per-second billing across multiple separate APIs is not.

2. Per-second billing

You pay for the actual GPU time consumed by your inference call, measured in seconds. Replicate is the canonical example: if your Flux Dev generation takes 12 seconds on an A40, you pay 12 × (A40 per-second rate). This aligns your cost with actual compute usage but makes cost estimation harder - generation time varies by prompt complexity, image dimensions, and inference steps.

Per-second billing also means cold starts are billed. If your first request triggers a 30-second model load before inference begins, you pay for those 30 seconds at the same rate. On Replicate, cold start time is part of your compute bill.

3. Per-hour GPU rental

You rent a GPU for a period of time and pay by the hour, regardless of whether you are running inference. This is the model for GPU cloud providers like RunPod, Vast.ai, Lambda, and CoreWeave. You get maximum flexibility - any model, any configuration, full root access - but pay for the GPU whether it is processing requests or idle.

Per-hour billing is cost-efficient when utilization is high and consistent. If your image pipeline runs at 80%+ GPU utilization continuously, per-hour pricing is typically cheaper than per-call or per-second APIs. If you have bursty, unpredictable workloads, you pay for idle time, which quickly negates the unit economics advantage.

4. Token-based pricing (text models - less relevant for images)

Token pricing is the standard for language model APIs (OpenAI, Anthropic, etc.) and applies to some multimodal models. For pure image generation, token pricing is rare - most image APIs use per-call or per-second models. DALL-E 3 from OpenAI is priced per image at fixed resolution tiers, which is effectively per-call pricing under a different name.

Pricing Model Comparison at Common Volumes

AI inference pricing model comparison - 10K images/month at Flux Dev quality - June 2026
ModelMechanismCost at 10K images/monthCost at 100K images/monthBest workload fit
Per-call (managed API)Fixed $/image~$200–$500~$1,500–$4,000Predictable, bursty workloads
Per-second (Replicate A40)~$0.00115/sec × ~12sec = ~$0.014/img~$140~$1,400Consistent volume, known generation time
Per-hour GPU rental (A40, RunPod)GPU hour regardless of useDepends on utilization - $100–$400$500–$1,500 at high utilizationHigh, consistent volume - 60%+ GPU use
Dedicated endpoint (HuggingFace)GPU hour (running or not)Single A40: ~$480/month flat~$480–$1,500 (scale endpoint)Always-on, predictable latency

The numbers above are approximations. Real costs depend on your specific model, image resolution, inference steps, and provider. Use the GPU Cost Calculator at /tools/gpu-cost-calculator to model your actual scenario.

The Hidden Costs That Do Not Appear on the Invoice

The invoice cost is only part of what inference actually costs your business. Teams that optimize only for per-image API cost often undercount the full picture.

Full cost of AI inference - components beyond the API bill - June 2026
Cost componentPer-call APIGPU rental + self-hostedManaged pipeline platform
GPU computeIncluded in per-call priceGPU rental costIncluded in per-call price
Model maintenanceNone - provider handlesWeight downloads, updates, compatibility testingNone
Scaling / autoscalingNone - provider handlesEngineer time to build + maintainNone
Cold start managementVaries by providerYour responsibilityPlatform handles
Output quality monitoringNone (you build or skip)You build or skipIncluded (e.g., Sentinel on Runflow)
On-call engineeringNoneSomeone is responsible at 3amNone
GPU instance managementNoneInstance selection, spot interruptions, restartsNone

The "on-call engineering" line is the one that surprises teams most. Self-hosted GPU inference means someone is responsible when the server goes down at 3am. For a 5-person startup, that cost is real even if it never appears on a spreadsheet: it is the senior engineer who cannot take vacation without putting someone on GPU babysitting duty.

For a detailed breakdown of self-hosted vs managed total cost of ownership, see /cost/self-hosted-stable-diffusion-total-cost-of-ownership.

$8,000–$12,000/month
Typical loaded engineer cost for a mid-level backend engineer managing GPU infrastructure
Industry salary ranges for SRE/backend engineers with GPU/ML ops experience, 2026

Cold Starts: The Invisible Cost in Per-Second Billing

Cold start cost is the most commonly underestimated line item in AI inference budgets. A cold start occurs when a model has been unloaded from GPU memory and must be reloaded before the next request. On serverless inference platforms, this happens whenever a model has been idle long enough for the provider to reclaim the GPU.

On per-second billing (Replicate), cold start time is directly billed. A 30-second cold start at an A40 rate adds ~$0.035 to the cost of that request - more than the inference itself for fast models.

On per-call APIs, cold starts affect latency but not your invoice. The provider absorbs the cost but passes it back as response time variance. If your product requires consistent latency, a provider with warm model pools is worth the potential per-call premium.

Cold start cost and latency by provider type - June 2026
Provider typeCold start latencyCold start billingMitigation
HuggingFace free tier30–120 secondsNot billed (shared queue)Use PRO or Dedicated Endpoints
Replicate10–45 secondsBilled as compute timeReplicate Deployments (keep warm)
fal.ai2–10 seconds typicalBilled as compute timeLower by architecture vs Replicate
GPU rental (RunPod, Vast.ai)First load only (keep warm yourself)Included in hourly rateKeep instance running
RunflowMinimal - warm poolNot separately billedArchitecture handles it

For measured cold start data across providers, see the benchmark at /deploy/gpu-cold-start-benchmarks. For a detailed explanation of what causes cold starts and how different architectures handle them, see /deploy/replicate-cold-start-fix.

Estimating Your Monthly Inference Cost

A simple framework for cost estimation before you commit to a provider:

1. Measure your expected volume: images per day, peak vs average, burst patterns. 2. Estimate your generation time: most providers publish benchmark latencies for common models. 3. Choose a billing model: per-call if volume is bursty; per-second if volume is steady; per-hour rental only if you can guarantee 60%+ GPU utilization. 4. Add the hidden costs: is anyone managing infrastructure? Is quality monitoring needed? 5. Run the number at 3× your expected volume: most products grow faster than planned.

The GPU Cost Calculator at /tools/gpu-cost-calculator automates steps 1–3 and lets you compare per-call, per-second, and per-hour billing for your specific model and volume.

When Each Pricing Model Makes Sense

Per-call pricing - right for:

Teams that want cost predictability above all else. Bursty workloads where you cannot predict volume day to day. Products in early growth where volume is low and invoice simplicity matters more than unit economics. Multi-step pipelines where a single per-call price covers the full chain.

Per-second billing - right for:

Teams comfortable modeling cost as (generation_time × rate). Stable, predictable volume where you know your average generation time. Use cases where model choice matters enough to pay for per-second flexibility.

Per-hour GPU rental - right for:

High-volume teams (50,000+ images per month) with consistent throughput. Teams with engineering capacity to manage GPU infrastructure. Custom model requirements not available on managed platforms. Never the right choice for teams that cannot guarantee sustained GPU utilization.

Spot Instances: Lower Cost, Higher Risk

GPU cloud providers (RunPod, Vast.ai, Lambda) offer spot instances: unused GPU capacity at discounts of 30-70% versus on-demand pricing. The trade-off is interruption risk - the provider can reclaim the GPU with short notice (typically 30-60 seconds) if the hardware is needed for a higher-priority job. For batch processing (generating a catalog of 10,000 product images overnight), spot instances are a strong cost optimization. For real-time user-facing generation, interruptions cause failed requests that require retry logic and may still cause visible latency spikes. Most teams use spot for batch and on-demand for real-time.

Batching: The Most Underused Cost Reduction

Batching means grouping multiple image generation requests into a single GPU inference call. Instead of calling the model 10 times with 1 image each, you call it once with a batch of 10 images. The GPU executes these in parallel, and total time is only marginally longer than a single call - but you pay for one call's worth of compute, not ten. On per-second billing, batching directly reduces cost by the batch size factor. On per-call billing, batching may not be available or may count each batch as one call regardless.

The practical constraint on batching is VRAM. Each additional image in a batch increases GPU memory requirements. On a 24GB GPU (RTX 3090), you can typically batch 4-8 images at 1024x1024 with SDXL. Exceeding available VRAM causes OOM (out of memory) errors. The optimal batch size requires experimentation against your specific GPU and resolution. For a guide to VRAM requirements by model and resolution, see the VRAM Calculator at /tools/vram-calculator.

Frequently Asked Questions

What is AI inference cost?

AI inference cost is what you pay to run an AI model on a request - generating an image, answering a question, or processing a document. It is distinct from training cost (which applies once, when the model is built). For image generation, inference cost covers the GPU time to run the diffusion process that converts your prompt into an image. Inference cost is what your application pays every time a user triggers an AI operation.

Is per-image pricing or per-second pricing cheaper?

It depends on your volume, model, and utilization. Per-second billing (Replicate) is often cheaper at high volume for models with predictable generation time, because you are paying for actual compute without the provider's margin built into a fixed per-call price. Per-call pricing is simpler to model and better for bursty workloads. For a direct comparison at your specific volume, use the GPU Cost Calculator at /tools/gpu-cost-calculator.

What is the difference between inference cost and training cost?

Training cost is the one-time (or periodic) cost of teaching a model - adjusting its weights based on large datasets. It is typically measured in thousands to millions of GPU-hours and is a one-time cost per model version. Inference cost is what you pay every time you use the trained model to generate an output. For most product teams, training cost is irrelevant - they use pre-trained open-source models. Inference cost is the ongoing operational cost that scales with usage.

How much does running 100,000 AI images per month cost?

At 100,000 images per month with a Flux Dev-quality model: per-second billing on an A40 (Replicate): approximately $1,400. Per-call managed API: approximately $3,000–$8,000 depending on provider and pipeline complexity. Per-hour GPU rental at high utilization: approximately $500–$2,000 plus engineering overhead. These are rough estimates - use the GPU Cost Calculator at /tools/gpu-cost-calculator for accurate numbers based on your model, resolution, and provider choice.

What is the cheapest way to run Flux Dev in production in 2026?

The cheapest option depends on your volume and operational capacity. At low volume (under 5,000 images/month): per-call APIs like fal.ai or Runware at roughly $0.01-0.03 per image. At medium volume (5,000-50,000 images/month): per-second billing on Replicate or fal.ai, where Flux Dev on an A40 costs roughly $0.014 per image at 12 seconds generation time. At high volume (50,000+ images/month) with sustained load: GPU rental on RunPod or Vast.ai, where a dedicated A100 at ~$2/hr can generate 150+ images/hour, costing under $0.02/image at full utilization. For a direct comparison at your volume, use the GPU Cost Calculator at /tools/gpu-cost-calculator.

Do GPU spot instances make sense for AI image generation?

Spot instances make sense for batch workloads where you can handle interruptions. If you are generating a catalog of product images overnight, spot instances at 40-60% discount are worth the retry logic overhead. For user-facing real-time generation, spot interruptions cause failed requests that are visible to users, so on-demand instances are the right choice. The practical approach: use spot for scheduled batch jobs, on-demand for anything user-triggered.

Does batching multiple images in one API call reduce cost?

Yes, on per-second billing. Batching 8 images in one call takes roughly 1.5-2x the time of a single image call, not 8x. On per-second billing, this reduces your cost per image by 4-5x versus serial single-image calls. On per-call billing, batching may count as one call regardless of batch size, or may not be available depending on the provider. The limit is VRAM: larger batches require proportionally more GPU memory, and exceeding VRAM capacity causes out-of-memory errors.

When does self-hosted GPU become cheaper than managed APIs?

Self-hosted GPU typically becomes cheaper than managed APIs at around 30,000-50,000 images per month, assuming you can achieve 60%+ GPU utilization. Below this volume, the fixed cost of a running GPU (idle time, under-utilization) exceeds the per-call savings versus managed APIs. Above this volume, GPU rental at $1-3/hour with high utilization beats per-image managed pricing by a significant margin. However, self-hosted also requires engineering time for infrastructure management - see /cost/self-hosted-stable-diffusion-total-cost-of-ownership for a full TCO comparison including operational overhead.