Install
openclaw skills install new-api-usageQuery 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-l...
openclaw skills install new-api-usageQuery quota and usage from a new-api deployment with explicit inputs.
--base-url and --key; never auto-read local config or keychain.# 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
| Option | Description |
|---|---|
--base-url | Required. new-api base URL, e.g. https://xxx.com |
--key | Required. API key |
--today | Only keep today's records (default) |
--all-records | Disable today's filter |
--limit N | Number of records shown in table (default: 100) |
--by-model | Show grouped usage by model |
--quota-only | Only show quota/balance |
--json | Print raw JSON payload |
--timeout | HTTP timeout seconds (default: 15) |
GET /api/usage/token/GET /api/log/token?key={api_key}500000 quota = $1.--today uses local timezone date boundaries.