get_usage
Retrieve account usage across authorized keys and sources, including request, completed/failed, and Credit counts for a UTC date range (default 7 days, max 31).
Instructions
Read account usage across all keys for sources permitted by this key: request counts, completed/failed counts and Credits by source. Defaults to 7 days; maximum 31 days. UTC from is inclusive and to exclusive, rounded down to minutes. Recent requests and refunds may not appear yet. 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": "get_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Exclusive UTC ISO timestamp, for example 2026-09-22T00:00:00Z. Date validity and the maximum 31-day window are checked by the usage API. | |
| from | No | Inclusive UTC ISO timestamp, for example 2026-09-21T00:00:00Z. With from alone, to is seven days later. | |
| source | No | An authorized source, including youtube_download usage. Omit for all sources authorized by this key. | |
| response_format | No | Agent-readable presentation. MCP defaults to Markdown; json returns the original JSON text, text returns indented fields. Structured fields remain available. Does not change billing or the stored job. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Exclusive UTC window end. | |
| code | No | Machine-readable error code when the operation fails. | |
| from | No | Inclusive UTC window start. | |
| note | No | Aggregation delay and consistency limitations. | |
| scope | No | ||
| detail | No | Additional problem detail returned by the API. | |
| totals | No | Usage across the authorized sources and all account API Keys. | |
| message | No | Error, delivery, or continuation instructions. | |
| bySource | No | ||
| updating | No | Whether pending aggregation work was observed. | |
| observedAt | No | UTC time of the usage snapshot. | |
| request_id | No | FlashData request identifier for support and tracing. | |
| http_status | No | Upstream HTTP status, when an upstream request was made. |