Query grouped usage cost subtotals for an account.
Returns rated dollar subtotals for usage over a time range, grouped by up to two of: HOUR, DAY, MODEL, USER, or API_KEY. Unlike GET /billingUsage (metered quantities) and GET /billing/summary (line items by billing category), this endpoint returns rated costs broken down by caller-supplied dimensions, with pagination and an account-wide subtotal. Requires account administrator access for ACCOUNT scope; SELF scope returns costs for the authenticated principal only.
Authorizations
Bearer authentication using your Fireworks API key. Format: Bearer <API_KEY>
Path Parameters
The Account Id
Body
Request for grouped usage cost subtotals over a time range.
Inclusive lower bound for usage event timestamps.
Exclusive upper bound for usage event timestamps.
ACCOUNT requires account administrator access. SELF derives the user ID from the authenticated principal.
SCOPE_UNSPECIFIED, ACCOUNT, SELF Dimensions to group by. At most two dimensions may be combined. HOUR and DAY are mutually exclusive. SESSION is intentionally filter-only to prevent high-cardinality enumeration.
DIMENSION_UNSPECIFIED, HOUR, MODEL, USER, API_KEY, DAY Optional exact-match filters. All populated fields are ANDed.
For paginated queries, the maximum number of grouped values to return. A page can contain more rows when each value spans multiple time buckets. Zero uses the server default; values above the maximum are clamped.
Opaque token from a previous response. Set this to retrieve the next page while keeping all other request fields unchanged.
4096Response
A successful response.
Cost rows for the requested dimensions. A successful response contains at most 10,100 rows and is limited to 4 MiB.
Opaque token for the next page. Empty when no additional page is available.
Subtotal for the complete query.
Time when this result was evaluated.
Whether the result may omit usage without a user ID. INCOMPLETE means the query filters by user, so historical unattributed usage may be excluded. The amount excluded is unknown.
ATTRIBUTION_COMPLETENESS_UNSPECIFIED, COMPLETE, INCOMPLETE, UNKNOWN