Account Reporter v2
Get key-level and account-level usage metrics for a calendar month or a custom date range.
What this endpoint does
Returns usage counters and remaining balance for both the authenticated API key (key_usage) and the entire account (account_usage). The two objects are identical if you only have one key. If you have multiple keys, account_usage reflects the sum across all keys.
Query parameters
Usage can be scoped one of two ways. The two modes are mutually exclusive. By month — passmonth in YYYY-MM format. If omitted, returns the current month.
start_date and end_date together in YYYY-MM-DD format (UTC). start_date is inclusive, end_date is exclusive, and the range cannot exceed 12 months.
month with start_date/end_date, or passing only one of start_date/end_date, returns a 400.
Usage fields
Bothkey_usage and account_usage return the same set of counters:
Authorizations
To access the API, provide your API key in x-api-key.
Query Parameters
Optional month in YYYY-MM format used to scope usage counters. Mutually exclusive with start_date and end_date. The month's start must not be more than 12 months in the past, and must not be entirely in the future.
7^\d{4}-\d{2}$Optional interval start date in YYYY-MM-DD format, UTC, inclusive. Must be provided together with end_date, and is mutually exclusive with month. Must not be more than 12 months before the current UTC date, and must not be entirely in the future (at least one day of the interval must be today or earlier).
10^\d{4}-\d{2}-\d{2}$Optional interval end date in YYYY-MM-DD format, UTC, exclusive. Must be provided together with start_date, must be strictly after start_date, and the interval cannot exceed 12 months. Mutually exclusive with month.
10^\d{4}-\d{2}-\d{2}$Response
Success. Returns usage for the authenticated key and account. Master API keys also receive unit prices in price.
Account reporter response containing key-level and account-level usage metrics. The optional price object is included only for master API keys.
Usage counters for a given time window.
Usage counters for a given time window.
The current account balance. This is a present-moment value, not a balance as of or within the requested month or start_date/end_date interval.
23.34
Unit prices in USD keyed by their corresponding Account Reporter usage field, derived from the latest payment row. Present only when the request is authenticated with a master API key. May be an empty object when no payment row exists. These are current prices, not the actual historical prices in effect during the requested month or start_date/end_date interval.