gateway.openapi_Gateway

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.

post/v1/accounts/{account_id}/usageCosts:query

Request

  • Base URL: https://api.fireworks.ai
  • URL: https://api.fireworks.ai/v1/accounts/{account_id}/usageCosts:query
  • Auth: HTTP bearer

Path parameters

account_idstring required

The Account Id

Request body

startTimestring date-time

Inclusive lower bound for usage event timestamps.

endTimestring date-time

Exclusive upper bound for usage event timestamps.

scope'SCOPE_UNSPECIFIED' | 'ACCOUNT' | 'SELF'
groupByQueryUsageCostsRequestDimension[]

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.

pageSizeinteger

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.

pageTokenstring

Opaque token from a previous response. Set this to retrieve the next page while keeping all other request fields unchanged.

Response

A successful response.

nextPageTokenstring

Opaque token for the next page. Empty when no additional page is available.

evaluationTimestring date-time

Time when this result was evaluated.

attributionCompleteness'ATTRIBUTION_COMPLETENESS_UNSPECIFIED' | 'COMPLETE' | 'INCOMPLETE' | 'UNKNOWN'

Changes

No recorded changes to this operation across all 1 revision of this API.