← 返回
数据分析 Key 中文

OpenRouter Analytics

Review OpenRouter usage, analytics, and troubleshooting data via API. Use when the user asks for spend/usage monitoring, activity trends, per-key management...
通过API查看OpenRouter的使用情况、分析和故障排除数据。适用于用户查询消费/使用监控、活动趋势及密钥管理等需求。
plgonzalezrx8
数据分析 clawhub v1.0.0 1 版本 99917.6 Key: 需要
★ 0
Stars
📥 1,213
下载
💾 10
安装
1
版本
#latest

概述

OpenRouter Analytics

Use this skill to pull management-level usage data and request-level troubleshooting details from OpenRouter.

Quick Start

Run from this skill folder:

cd ~/clawd/skills/openrouter-analytics

Management key operations (set OPENROUTER_MANAGEMENT_KEY):

python3 scripts/openrouter_analytics.py activity --limit 20
python3 scripts/openrouter_analytics.py activity --date 2026-02-18
python3 scripts/openrouter_analytics.py activity --from 2026-02-01 --to 2026-02-18 --summary --csv /tmp/activity.csv
python3 scripts/openrouter_analytics.py credits
python3 scripts/openrouter_analytics.py keys --limit 50 --summary
python3 scripts/openrouter_analytics.py report --from 2026-02-01 --to 2026-02-18 --format markdown

Request-level troubleshooting (set OPENROUTER_API_KEY):

python3 scripts/openrouter_analytics.py generation --id <generation_id>

Use --raw on any command to print full JSON.

Workflow

  1. Check macro activity
    • Run activity for daily spend/traffic patterns.
  2. Check account-level usage
    • Run credits to review consumed vs remaining credits.
  3. Find key-level consumers
    • Run keys to identify which keys are driving usage.
  4. Investigate incidents
    • Run generation --id ... for detailed logs on one request (latency, fallback providers, finish reason, token and cost details).

Notes

  • activity, credits, keys, and report require a Management API key.
  • generation uses a standard OpenRouter API key and requires the request id.
  • The script auto-loads ~/.openclaw/.env and current-directory .env before execution.
  • Use --retries and --timeout to tune robustness under transient API/network issues.
  • Keep generation IDs in your application logs to support reliable post-incident analysis.

Resources

  • Endpoint reference and field guide: references/endpoints.md
  • CLI helper script: scripts/openrouter_analytics.py

版本历史

共 1 个版本

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

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,874
ai-intelligence

Agent Builder

plgonzalezrx8
端到端构建高性能 OpenClaw 智能体。用于设计新智能体(包含人设与运行规则)并生成所需工作区文件,或迭代现有智能体的行为、护栏、自主模型、心跳计划及技能列表。
★ 30 📥 10,371
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 199 📥 65,265