返回 Skill 列表
extension
分类: 开发与工程无需 API Key

openrouter-analyzer

分析OpenRouter API使用情况的CSV导出文件,以按小时、天、模型和提供商计算成本、令牌使用情况和效率指标。当用户附上来自OpenRouter的CSV文件,并提及分析令牌使用情况、成本分析或OpenRouter使用数据时使用。自动检测OpenRouter CSV格式并生成每小时细分、模型使用统计和提供商成本细分。

person作者: jakexiaohubgithub

OpenRouter Usage Analyzer

Analyzes OpenRouter API usage exports to provide cost and token insights.

When to Use

  • User attaches a CSV file from OpenRouter dashboard
  • User asks to analyze token usage or costs
  • User mentions OpenRouter usage data
  • User wants hourly/daily cost breakdowns

How to Use

When triggered by CSV attachment or usage analysis request:

  1. Save the attached CSV to a temp location if needed
  2. Run the analyzer script: python3 scripts/analyze.py <csv_path> --model --provider
  3. Present the results in a clean, formatted way highlighting:
    • Total spend and cost per request
    • Peak usage hours
    • Model breakdown (Kimi, Mimo, etc.)
    • Provider costs (Moonshot, Chutes, Novita, etc.)
    • Cost efficiency metrics

Output Format

Present results in sections:

  • 💰 Cost Efficiency (total spend, per-request cost, avg latency)
  • 📊 Hourly Breakdown (cost per hour, requests, tokens)
  • 📅 Daily Summary (if multi-day)
  • 🤖 Model Breakdown (which models cost what)
  • 🏢 Provider Breakdown (which providers used)

Script Usage

# Basic analysis
python3 scripts/analyze.py <csv_file>

# With all breakdowns
python3 scripts/analyze.py <csv_file> --model --provider

# Export to CSV
python3 scripts/analyze.py <csv_file> --export output.csv

The script has no dependencies - uses only Python standard library.