Skip to content

eagerspark-cmd/ai-api-cost-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

AI API Cost Calculator

Compare AI API pricing across providers with real-time data. Calculate monthly costs for your usage patterns.

Usage

from calculator import compare

# Compare 3 models for a chatbot scenario
result = compare(
    monthly_tokens_in=100_000_000,   # 100M input tokens
    monthly_tokens_out=50_000_000,   # 50M output tokens
    models=["deepseek-ai/DeepSeek-V4-Flash", "qwen3-32b", "gpt-4o"],
)
result.print_table()

Data Source

Pricing data fetched from Global API — verified May 2026. 184+ models tracked.

Why Use This?

  • Real pricing — not estimates, pulled from live API
  • Multi-provider — DeepSeek, Qwen, Kimi, GLM, Doubao, Hunyuan, 180+ models
  • Monthly projections — input your token volume, get exact monthly cost
  • Free to run — no API key needed for pricing data

Install

pip install requests tabulate
python calculator.py

About

Compare AI API pricing across providers with real-time data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages