Get usage
get_usageRead account usage and spend per API key, paginated newest first, with optional period or from/to date breakdowns.
Instructions
Read the account's usage and spend per API key, newest keys first, 10 keys per page (pass starting_after = the previous answer's next_cursor for the next page; limit up to 1000). Pass period (e.g. 7d, max 30d) for a by-date breakdown, or from + to. Needs a dashboard JWT or a custom-tier superkey; a plain inference key gets PERMISSION_DENIED (403). Needs a Relay credential.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date `YYYY-MM-DD`; use together with `from`. | |
| from | No | Start date `YYYY-MM-DD`; use together with `to`. | |
| limit | No | Keys per page (default 10, max 1000). | |
| period | No | Time period shorthand, e.g. `7d` or `30d` (max 30 days); adds a by-date breakdown. | |
| starting_after | No | Cursor: the `next_cursor` of the previous page. |