new-api-usage

Query usage statistics and quota from a user-specified new-api endpoint. Use when the user asks to check API quota, usage records, token consumption, model-level usage, or remaining balance. Requires explicit --base-url and --key input.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "new-api-usage" with this command: npx skills add wang48/new-api-usage

New API Usage Query

Query quota and usage from a new-api deployment with explicit inputs.

Safety Rules

  • Require explicit --base-url and --key; never auto-read local config or keychain.
  • Never print the full API key in output.
  • Only perform read-only GET requests to usage endpoints.
  • If the endpoint is unknown, ask user to confirm before querying.

Usage

# Summary (today's records only)
uv run python scripts/query_usage.py \
  --base-url https://your-new-api.example.com \
  --key sk-xxxxx

# Quota only
uv run python scripts/query_usage.py \
  --base-url https://your-new-api.example.com \
  --key sk-xxxxx \
  --quota-only

# Model aggregation with all records
uv run python scripts/query_usage.py \
  --base-url https://your-new-api.example.com \
  --key sk-xxxxx \
  --all-records \
  --by-model

Options

OptionDescription
--base-urlRequired. new-api base URL, e.g. https://xxx.com
--keyRequired. API key
--todayOnly keep today's records (default)
--all-recordsDisable today's filter
--limit NNumber of records shown in table (default: 100)
--by-modelShow grouped usage by model
--quota-onlyOnly show quota/balance
--jsonPrint raw JSON payload
--timeoutHTTP timeout seconds (default: 15)

API Endpoints

  • GET /api/usage/token/
  • GET /api/log/token?key={api_key}

Notes

  • Quota conversion in script uses 500000 quota = $1.
  • --today uses local timezone date boundaries.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

baidu-search

Comprehensive search API integration for Baidu Qianfan Web Search. Use when Claude needs to perform web searches using Baidu Qianfan's enterprise search API....

Registry SourceRecently Updated
General

Self Memory Manager

管理 Claude 的记忆和工作流程优化。包括:(1) Context 使用管理 (2) 重要信息存档 (3) 定时总结 (4) 工作文件夹维护 用于:context 超过 80%、重要信息需要记录、每日总结、清理旧 session

Registry SourceRecently Updated
General

Seedance Video

Generate AI videos using ByteDance Seedance. Use when the user wants to: (1) generate videos from text prompts, (2) generate videos from images (first frame,...

Registry SourceRecently Updated