← 返回
开发者工具 中文

OEE AI Cost Tracker

Tracks AI API usage by logging calls, reporting spending by model and period, and suggesting cheaper models to optimize costs.
记录API调用,按模型和周期报告费用,并推荐更经济的模型以优化成本。
odinbot33
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 997
下载
💾 18
安装
1
版本
#latest

概述

🐾 AI Cost Tracker — Know What You Spend

> by Odin's Eye Enterprises — Ancient Wisdom. Modern Intelligence.

Track every AI API call, generate spend reports, and get routing suggestions to cut costs.

What It Does

  1. Logs every API call with model, tokens, cost to JSONL
  2. Reports spending by model, time period, and use case
  3. Suggests cheaper model routing based on task complexity

Trigger Phrases

  • "how much have I spent on AI"
  • "AI cost report"
  • "track this API call"
  • "show AI spending"
  • "cost breakdown"

Usage

Logging (in your code)

from tracker import log_usage
log_usage(model="claude-3-haiku", input_tokens=500, output_tokens=200, task="humanize")

Reports

# Full spend report
python report.py

# Last 7 days
python report.py --days 7

# By model
python report.py --by-model

Files

  • tracker.py — logging library, import into your tools
  • report.py — CLI dashboard for spend analysis
  • pricing.json — model pricing data (update as needed)

Requirements

  • Python 3.10+ (stdlib only)
  • No API keys needed (this tracks YOUR usage)

For Agents

To check spending: python report.py

To log usage from other tools: from tracker import log_usage

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 06:47 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,211
developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,807
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,217