Usage analytics
pinin_get_usageRead usage analytics for 1–90 days to review request/error/restoration/credit totals, monthly credits and balance, per-key breakdown, and daily trends; use it to explain spend changes or error spikes.
Instructions
Read usage analytics for the last days: totals for requests, errors, restorations and credits; the current month's credits used and balance; a per-key breakdown; and a per-day series. Use it to explain a spend, a spike in errors or a quiet account; use pinin_get_account for the current limits and balance on their own. Read-only and free.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pinin_get_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Window in days, 1–90. Default 30. The monthly block is calendar-month, not this window. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| daily | No | One row per day: `{ day, requests, error_requests, restorations, credits }`. | |
| by_key | No | Per-key rows for the month, with the key prefix and its share of spend. | |
| object | No | Always `usage`. | |
| totals | No | `{ requests, errors, restorations, credits }` for the window. | |
| monthly | No | `{ period, credits_used, restorations, credits_balance }` for the calendar month. | |
| period_days | No | Length of the window in days. |