Ai Cost Calculator Api — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Ai Cost Calculator Api (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<p align="center"><img src="logo.png" width="120" alt="logo"></p>
⭐ Building in public from $0 MRR. Star if you want to follow the journey — lazymac-mcp (42 tools, one MCP install) · lazymac-k-mcp (Korean wedge) · lazymac-sdk (TS client) · api.lazy-mac.com · Pro $29/mo.
🚀 Want all 42 lazymac tools through ONE MCP install? npx -y @lazymac/mcp · Pro $29/mo for unlimited calls.The world's first AI model cost estimation API.
Calculate, compare, and optimize your AI spending across every major provider -- Anthropic, OpenAI, Google, Meta, and Mistral -- with a single API call.
No other product does this. Every AI startup, developer, and enterprise building on LLMs needs to understand and control their costs. This API makes that trivial.
This API solves all of that.
npm install
npm start
# Server runs on http://localhost:5000curl -X POST http://localhost:5000/api/v1/calculate \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-4","input_tokens":1000,"output_tokens":500}'curl -X POST http://localhost:5000/api/v1/estimate \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","requests_per_day":1000,"avg_input_tokens":2000,"avg_output_tokens":500}'curl -X POST http://localhost:5000/api/v1/compare \
-H "Content-Type: application/json" \
-d '{"input_tokens":5000,"output_tokens":1000}'curl "http://localhost:5000/api/v1/cheapest?input_tokens=1000&output_tokens=500&budget=0.01"curl http://localhost:5000/api/v1/modelscurl http://localhost:5000/api/v1/models/anthropiccurl -X POST http://localhost:5000/api/v1/tokens \
-H "Content-Type: application/json" \
-d '{"text":"How much would it cost to process this sentence?"}'Use with Claude Desktop or any MCP-compatible client:
{
"mcpServers": {
"ai-cost-calculator": {
"command": "node",
"args": ["src/mcp-server.js"]
}
}
}| Provider | Model | Input $/MTok | Output $/MTok |
|---|---|---|---|
| Anthropic | Claude Opus 4 | $15.00 | $75.00 |
| Anthropic | Claude Sonnet 4 | $3.00 | $15.00 |
| Anthropic | Claude Haiku 3.5 | $0.80 | $4.00 |
| OpenAI | GPT-4o | $2.50 | $10.00 |
| OpenAI | GPT-4o Mini | $0.15 | $0.60 |
| OpenAI | GPT-4 Turbo | $10.00 | $30.00 |
| OpenAI | o1 | $15.00 | $60.00 |
| OpenAI | o3-mini | $1.10 | $4.40 |
| Gemini 2.0 Flash | $0.10 | $0.40 | |
| Gemini 1.5 Pro | $1.25 | $5.00 | |
| Meta | Llama 3.1 405B | $3.00 | $3.00 |
| Meta | Llama 3.1 70B | $0.70 | $0.80 |
| Mistral | Mistral Large | $2.00 | $6.00 |
| Mistral | Mistral Small | $0.20 | $0.60 |
docker build -t ai-cost-calculator-api .
docker run -p 5000:5000 ai-cost-calculator-apiMIT
<sub>💡 Host your own stack? <a href="https://m.do.co/c/c8c07a9d3273">Get $200 DigitalOcean credit</a> via lazymac referral link.</sub>
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.