API reference · Schema
CostReport
objectstringrequiredAlways `cost_report`: the type of this object
One of
cost_reportstartstring (date-time)requiredStart of the reported period (inclusive)
endstring (date-time)requiredEnd of the reported period (exclusive)
bucketstringrequiredWidth of each `series` bucket, aligned to UTC
One of
dayhourgroup_bystringrequiredWhat `key` identifies in `breakdown` and `series`: `product` (compute, inference, batch_inference, evaluations, training, storage, dedicated_endpoints, other), `line_item` (`<meter>:<price_key>`, the meter and price key of the price sheet), `project` (a project ID) or `api_key` (an API key ID, `none` for usage not made with a key)
One of
productline_itemprojectapi_keycurrencystringrequiredAlways `usd`
One of
usdtotalstringrequiredInteger nano-USD as a decimal string
pattern ^-?[0-9]+$
breakdownarray of objectrequiredOne row per group, largest first
ShowHide 3 fields of
breakdownkeystringrequiredThe group, as chosen by `group_by`
totalstringrequiredInteger nano-USD as a decimal string
pattern ^-?[0-9]+$
quantitystring | nullrequiredTotal units used in the period, as a decimal string, in the line item's meter unit (tokens, seconds, characters…); null unless `group_by` is `line_item`
seriesarray of objectrequiredSpend per bucket and group in time order; buckets and groups with no spend are left out
ShowHide 3 fields of
seriesbucket_startstring (date-time)requiredStart of the bucket (UTC)
keystringrequiredThe group, as chosen by `group_by`
amountstringrequiredInteger nano-USD as a decimal string
pattern ^-?[0-9]+$
{
"object": "cost_report",
"start": "2026-01-01T00:00:00.000Z",
"end": "2026-01-01T00:00:00.000Z",
"bucket": "day",
"group_by": "product",
"currency": "usd",
"total": "1500000000",
"breakdown": [
{
"key": "string",
"total": "1500000000",
"quantity": "string"
}
],
"series": [
{
"bucket_start": "2026-01-01T00:00:00.000Z",
"key": "string",
"amount": "1500000000"
}
]
}Used by
- Spend over time, grouped, with a breakdown table
GET /v1/orgs/{org_id}/usage/costs