Skip to main content
GET
Account Reporter V2
This call is free — it does not consume credits or count against your rate limit.

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 — pass month in YYYY-MM format. If omitted, returns the current month.
By custom date range — pass 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.
In both modes, the window’s start cannot be more than 12 months in the past, and the window cannot be entirely in the future. Combining month with start_date/end_date, or passing only one of start_date/end_date, returns a 400.

Usage fields

Both key_usage and account_usage return the same set of counters:
balance_remaining_usd is always the current balance, and price (master keys only) is always the current unit price. Neither is a historical value for the requested month or date range.

Authorizations

x-api-key
string
header
required

To access the API, provide your API key in x-api-key.

Query Parameters

month
string

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.

Required string length: 7
Pattern: ^\d{4}-\d{2}$
start_date
string<date>

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).

Required string length: 10
Pattern: ^\d{4}-\d{2}-\d{2}$
end_date
string<date>

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.

Required string length: 10
Pattern: ^\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.

key_usage
object

Usage counters for a given time window.

account_usage
object

Usage counters for a given time window.

balance_remaining_usd
number<float>

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.

Example:

23.34

price
object

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.