← 返回
开发者工具 中文

Usage Tracker

Track and log AI API usage across providers, calculate costs, and generate daily, weekly, or monthly reports filtered by model and task type.
跨提供商追踪并记录AI API使用情况, 计算费用, 生成按模型和任务类型筛选的每日、每周或每月报告。
punkaze
开发者工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 548
下载
💾 7
安装
1
版本
#latest

概述

Usage Tracker Skill

Track AI model usage and generate cost reports across all providers.

Overview

This skill tracks AI API calls and generates cost reports. It supports:

  • Multiple providers: MiniMax, Anthropic, OpenAI, Google, xAI, Voyage, Mistral
  • Cost calculation based on current pricing
  • Daily, weekly, and monthly reports
  • Filtering by model and task type

Tools

log_usage

Log an AI API call for tracking.

Parameters:

  • provider (required): Provider name (minimax-portal, anthropic, openai, google, xai, voyage, mistral)
  • model (required): Model identifier (e.g., MiniMax-M2.5, gpt-4o, claude-3-opus)
  • input_tokens (required): Number of input tokens
  • output_tokens (required): Number of output tokens
  • task_type (optional): Type of task (coding, reasoning, general, writing, analysis, chat)

usage_report

Generate a usage and cost report.

Parameters:

  • period (required): Time period (daily, weekly, monthly)
  • model_filter (optional): Filter by model name
  • task_filter (optional): Filter by task type

realtime_report

Get real-time usage report for the last 24 hours. No parameters required.

Usage Examples

Log a usage call:
log_usage(provider="minimax-portal", model="MiniMax-M2.5", input_tokens=1500, output_tokens=800, task_type="general")

Get daily report:
usage_report(period="daily")

Get weekly report:
usage_report(period="weekly", model_filter="gpt")

Get real-time report:
realtime_report()

Pricing (USD per 1M tokens)

ProviderModelInputOutput
--------------------------------
MiniMax PortalM2.5FreeFree
AnthropicClaude Opus 4$15$75
AnthropicClaude Sonnet 4$3$15
AnthropicClaude Haiku 4$0.80$4
OpenAIGPT-4.5$75$300
OpenAIGPT-4o$2.50$10
OpenAIGPT-4o Mini$0.15$0.60
GoogleGemini 2.5 Pro$1.25$10
GoogleGemini 1.5 Flash$0.075$0.30
xAIGrok 2$2$10

Telegram Commands

  • /usage - Get real-time usage report (last 24 hours)
  • /cost - Get real-time usage report (last 24 hours)

Storage

Logs are stored in: usage-logs/api-cells.jsonl

Reports can be generated on-demand using the tools above.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 09:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

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

Github

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

CodeConductor.ai

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