Read usage and spend
get_usageRetrieve this API key's successful requests, errors, token counts, and USD charges by UTC day or hour, optionally per model; use it to track spending, not account balance.
Instructions
What this Kunavo API key has used and been charged: successful requests, errors, tokens and cost in USD, per UTC day or hour, optionally per model. It covers this key only, not the account's other keys, and it is not the balance: get_balance is. Free to call.
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": "get_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket | No | Row size. A range may span 90 days by day, 7 days by hour. | day |
| by_model | No | One row per model in each day or hour. | |
| end_date | No | Last UTC day, YYYY-MM-DD. Default: today. | |
| start_date | No | First UTC day, YYYY-MM-DD. Default: 29 days before end_date by day, or the day before end_date by hour. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| bucket | Yes | ||
| totals | Yes | ||
| api_key | Yes | ||
| by_model | No | ||
| end_date | Yes | ||
| start_date | Yes |