Self-host gemma 3 4b it vs. API cost

Live OpenRouter API pricing is $0.05/1M input & $0.10/1M output. Renting 1× L4 on Vast.ai costs $0.32/hr ($234/mo) and breaks even at 121.9M tokens/day.

GPU: 2026-12-05 · API (OpenRouter live): 2026-12-05 Run gemma-3-4b-it VRAM guide → Fine-tune cost →

Interactive breakeven calculator

API spend (OpenRouter)
-
-
Cheapest self-host GPU (24h/day)
-
-
Recommendation & breakeven
-
-

All FP8 self-hosting setups for gemma-3-4b-it (~7 GB VRAM)

GPU setup Provider GPU / hr Monthly (730h) Est. peak tok/s Self-host $/1M @ 40% Breakeven Deploy
1× NVIDIA L4 Cheapest Vast.ai logo Vast.ai $0.32/hr $234 273 tok/s $0.814 121.9M/day Launch ↗
1× NVIDIA RTX 4090 TensorDock logo TensorDock $0.38/hr $277 917 tok/s $0.288 144.8M/day Launch ↗
1× NVIDIA RTX A6000 Vast.ai logo Vast.ai $0.40/hr $292 696 tok/s $0.399 152.4M/day Launch ↗
1× NVIDIA RTX A6000 TensorDock logo TensorDock $0.45/hr $329 696 tok/s $0.449 171.4M/day Launch ↗
1× NVIDIA RTX 4090 Vast.ai logo Vast.ai $0.45/hr $329 917 tok/s $0.341 171.4M/day Launch ↗
1× NVIDIA RTX 5090 Vast.ai logo Vast.ai $0.53/hr $387 1,625 tok/s $0.226 201.9M/day Launch ↗
1× NVIDIA L4 Google Cloud logo Google Cloud $0.56/hr $409 273 tok/s $1.424 213.3M/day Launch ↗
1× NVIDIA A100 80GB SXM Vast.ai logo Vast.ai $0.58/hr $423 1,625 tok/s $0.248 221.0M/day Launch ↗

All 4-bit (Q4) self-hosting setups for gemma-3-4b-it (~4 GB VRAM)

GPU setup Provider GPU / hr Monthly (730h) Est. peak tok/s Self-host $/1M @ 40% Breakeven Deploy
1× NVIDIA L4 Cheapest Vast.ai $0.32/hr $234 494 tok/s $0.450 121.9M/day Launch ↗
1× NVIDIA RTX 4090 TensorDock $0.38/hr $277 1,625 tok/s $0.162 144.8M/day Launch ↗
1× NVIDIA RTX A6000 Vast.ai $0.40/hr $292 1,268 tok/s $0.219 152.4M/day Launch ↗
1× NVIDIA RTX A6000 TensorDock $0.45/hr $329 1,268 tok/s $0.246 171.4M/day Launch ↗
1× NVIDIA RTX 4090 Vast.ai $0.45/hr $329 1,625 tok/s $0.192 171.4M/day Launch ↗
1× NVIDIA RTX 5090 Vast.ai $0.53/hr $387 1,625 tok/s $0.226 201.9M/day Launch ↗
1× NVIDIA L4 Google Cloud $0.56/hr $409 494 tok/s $0.787 213.3M/day Launch ↗
1× NVIDIA A100 80GB SXM Vast.ai $0.58/hr $423 1,625 tok/s $0.248 221.0M/day Launch ↗

Physics & breakeven methodology

1. Dollar breakeven: breakeven_M_per_day = (GPU_$/hr × 24) ÷ blended_API_$/1M. We pull live token pricing from OpenRouter's public API so API benchmarks stay current.

2. Throughput & node count: Autoregressive decoding is memory-bandwidth bound: single_stream_tok_s = min(250, (total_BW_TB/s × 600) ÷ active_GB) using 4.3B active parameters. Continuous batching (vLLM / SGLang) multiplies peak node throughput by 6.5×, scaled by your selected utilization preset (15%, 40%, or 75%). If your daily volume exceeds 1 node's capacity, the calculator automatically multiplies the node count needed.