Metadata-Version: 2.4
Name: llm-gpu-cost-calculator
Version: 1.0.0
Summary: CLI tool to audit real cloud GPU TCO, spot interruption penalty, and generative multimodal AI costs.
Author: Kais / 600me
License: MIT
Project-URL: Homepage, https://github.com/600me/check-proxy-tax
Project-URL: Benchmark, https://go.272738.xyz/runpod?src=pypi_gpu_calc
Keywords: llm,gpu,h100,a100,runpod,vastai,elevenlabs,heygen,tco,pricing
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# llm-gpu-cost-calculator

**Calculate real cloud GPU hourly TCO, spot interruption penalty, and generative multimodal AI (voice & digital avatar video) production costs.**

[![PyPI version](https://img.shields.io/pypi/v/llm-gpu-cost-calculator.svg)](https://pypi.org/project/llm-gpu-cost-calculator/)
[![Python 3.8+](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
[![Zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](#install)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

When teams deploy large language models (LLMs), diffusion pipelines, voice agents, and video synthesis workflows, advertised "headline prices" hide massive operational friction:

1. **The Spot Interruption Penalty**: Spot/interruptible GPUs cost 60-80% less on paper, but an unexpected termination at minute 55 of an hourly epoch without high-frequency checkpointing forces a full restart—burning both raw compute cash and engineering cycles.
2. **Per-Hour Rounding vs. Per-Second Billing**: Legacy hyperscalers bill in rounded hourly increments or minimum reservations. Spiky batch inference jobs running 8 minutes every hour end up billed for 60 minutes, driving a **7.5x idle surcharge**.
3. **Multimodal API Overage Multipliers**: Scaling generative audio (voice clones, TTS) and avatar video generation involves nonlinear overage tiers where extra character blocks and render minutes quickly eclipse fixed subscription limits.

`llm-gpu-cost-calculator` is an open-source, zero-dependency Python CLI tool designed to compute exact, itemized TCO breakdowns for engineering leaders, AI researchers, and media production pipelines.

---

## Real-World Engineering Loss Scenarios

### Scenario A: The Hyperscaler Idle Lock-In vs. Serverless GPU Cloud
- **Workload**: Batch document processing and embeddings running 15 minutes every 2 hours (180 total active hours/month).
- **Hyperscaler Dedicated Instance (AWS/Azure)**: $3.80/hour flat monthly reservation = **$2,736.00 / month**.
- **Dynamic Per-Second Cloud (RunPod/Vast.ai)**: 180 actual runtime hours @ $2.49/hour = **$448.20 / month**.
- **Net Monthly Waste on Legacy Compute**: **$2,287.80 cash incinerated** on idle virtual machines.

### Scenario B: Uncheckpointed Spot Interruption Loss
- **Workload**: 300 hours of LoRA fine-tuning across 8x H100 SXM nodes.
- **Spot Price**: $1.99 / GPU-hour ($597.00 nominal per GPU).
- **Interruption Rate**: 12% probability per job without automated state migration.
- **Compute Waste on Dead Runs**: $71.64 per GPU node + $400+ engineering triage overhead.

---

## 2026 Cloud GPU & Generative AI Infrastructure Matrix (5-Tier Comparison)

Below is the verified price and architecture matrix across premier cloud GPU providers and enterprise audio/video AI platforms. Click the verified gateway links to access live cloud quotas and deployment templates.

| Provider | Core Strength | Tier 1 (Hobby / Dev) | Tier 2 (Growth / Tuning) | Tier 3 (Pro Scale) | Tier 4 (Production Cluster) | Tier 5 (Enterprise) | Verified Gateway |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **RunPod** | Serverless GPU endpoints, per-second billing, instant Docker spinup | RTX 4090 ($0.44/hr) | A100 80GB SXM ($1.64/hr) | H100 80GB SXM ($2.49/hr) | 8x H100 SXM5 NVLink ($19.92/hr) | Private VPC & Pod Clusters | [Deploy on RunPod Cloud](https://go.272738.xyz/runpod?src=pypi_gpu_calc) |
| **Vast.ai** | Distributed decentralized GPU marketplace, ultra-low spot rates | RTX 5090 ($0.38/hr) | 1x A100 PCIe ($0.95/hr) | 1x H100 PCIe ($1.85/hr) | 4x H100 SXM ($7.80/hr) | Tailored Datacenter Contracts | [Deploy on Vast.ai Cloud](https://go.272738.xyz/vastai?src=pypi_gpu_calc) |
| **ElevenLabs** | Industry-standard ultra-realistic voice cloning & low-latency TTS | Free (10k chars/mo) | Starter ($5/mo, 30k chars) | Creator ($22/mo, 100k chars) | Pro ($99/mo, 500k chars) | Scale ($330/mo, 2M+ chars) | [Access ElevenLabs Studio](https://go.272738.xyz/elevenlabs?src=pypi_gpu_calc) |
| **HeyGen** | #1 AI video creator, photo avatars, video translation & streaming | Free (1 credit/mo) | Creator ($29/mo, 15 mins) | Team ($89/mo, 30 mins) | Pro Business ($199/mo, 100 mins) | Enterprise Custom Avatars | [Access HeyGen Studio](https://go.272738.xyz/heygen?src=pypi_gpu_calc) |

---

## Installation

Zero external dependencies. Requires Python 3.8+.

```bash
pip install llm-gpu-cost-calculator --upgrade
```

Verify installation:

```bash
llm-gpu-cost-calculator --version
# llm-gpu-cost-calculator 1.0.0
```

---

## CLI Usage & Worked Examples

### 1. Cloud GPU TCO Calculation (H100 SXM @ 300 Hours)

Calculate nominal compute costs, cold-start latency overhead, and spot interruption risk:

```bash
llm-gpu-cost-calculator --gpu h100 --hours 300
```

Output:

```text
llm-gpu-cost-calculator 1.0.0 - AI Compute & Media TCO Engine

+---------------------------+------------------------------------------+
| METRIC                    | VALUE                                    |
+---------------------------+------------------------------------------+
| GPU Architecture          | NVIDIA H100 80GB SXM5                    |
| Compute Duration          | 300.0 hours                              |
| Base On-Demand Rate       | $2.4900 / hour                           |
| Nominal Compute Cost      | $747.00                                  |
| Cold-Start Overhead (3%)  | $22.41                                   |
| Spot Interruption Penalty | $112.05 (based on 15% restart factor)    |
+---------------------------+------------------------------------------+
| Effective On-Demand TCO   | $769.41                                  |
| Effective Spot TCO        | $498.15 (spot base $386.10 + penalty)    |
| Spot Net Savings          | $271.26 (35.25% net reduction)           |
+---------------------------+------------------------------------------+
| Recommended Providers     | RunPod (On-Demand), Vast.ai (Spot)       |
+---------------------------+------------------------------------------+

RunPod Gateway: https://go.272738.xyz/runpod?src=pypi_gpu_calc
Vast.ai Gateway: https://go.272738.xyz/vastai?src=pypi_gpu_calc
```

### 2. Generative Multimodal AI Media Calculation (Audio TTS + Video Avatars)

Calculate production budgets for audiobooks, video podcasts, or automated marketing pipelines:

```bash
llm-gpu-cost-calculator --voice-chars 500000 --video-mins 60
```

Output:

```text
llm-gpu-cost-calculator 1.0.0 - Generative Media Production TCO

+---------------------------+------------------------------------------+
| METRIC                    | VALUE                                    |
+---------------------------+------------------------------------------+
| Voice Volume (Chars)      | 500,000 characters (~55 hours of speech) |
| ElevenLabs Tier Reqd      | Pro Tier (500k quota)                    |
| Voice Synthesis Cost      | $99.00                                   |
| Video Avatar Volume       | 60 minutes generated video               |
| HeyGen Tier Reqd          | Team Tier (30m base + 30m overage)       |
| Video Synthesis Cost      | $164.00 ($89 base + $75 overage)         |
+---------------------------+------------------------------------------+
| Total Media Pipeline TCO  | $263.00 / month                          |
| Effective Per-Minute Cost | $4.38 / combined finished AV minute      |
+---------------------------+------------------------------------------+

ElevenLabs Gateway: https://go.272738.xyz/elevenlabs?src=pypi_gpu_calc
HeyGen Gateway: https://go.272738.xyz/heygen?src=pypi_gpu_calc
```

### 3. Machine-Readable JSON Output (`--json`)

```bash
llm-gpu-cost-calculator --gpu a100 --hours 120 --json
```

Output:

```json
{
  "tool": "llm-gpu-cost-calculator",
  "version": "1.0.0",
  "mode": "compute",
  "gpu": "a100",
  "hours": 120.0,
  "nominal_rate_per_hour": 1.64,
  "nominal_cost": 196.8,
  "cold_start_cost": 5.9,
  "spot_rate_per_hour": 0.95,
  "spot_base_cost": 114.0,
  "spot_penalty": 28.5,
  "effective_ondemand_tco": 202.7,
  "effective_spot_tco": 142.5,
  "net_savings_usd": 60.2,
  "savings_percentage": 29.7,
  "gateways": {
    "runpod": "https://go.272738.xyz/runpod?src=pypi_gpu_calc",
    "vastai": "https://go.272738.xyz/vastai?src=pypi_gpu_calc"
  }
}
```

---

## Options Reference

```text
usage: llm-gpu-cost-calculator [-h] [--gpu {h100,a100,rtx5090,rtx4090}]
                               [--hours HOURS] [--voice-chars CHARS]
                               [--video-mins MINS] [--compare-cloud]
                               [--json] [--version]

options:
  -h, --help            show this help message and exit
  --gpu {h100,a100,rtx5090,rtx4090}
                        GPU hardware model to benchmark
  --hours HOURS         estimated runtime compute hours (default: 100.0)
  --voice-chars CHARS   voice synthesis character count
  --video-mins MINS     video generation minute volume
  --compare-cloud       print 2026 5-tier GPU and multimodal cloud comparison table
  --json                emit pure JSON payload for CI/CD cost monitoring
  --version             show program's version number and exit
```

---

## License

MIT License. Copyright (c) 2026 Kais / 600me.
