The Meter Usage Analytics object 

Attributes

  • objectstring

    String representing the object’s type. Objects of the same type share the same value.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • refreshed_attimestamp

    The timestamp to indicate data freshness, measured in seconds since the Unix epoch.

  • rowsobject

    List of aggregate meter usage items, each with a start time, end time, value, and any meter or dimension details.

    • rows.dataarray of objects

      The aggregated meter usage data for the specified customer and time range.

      • rows.data.idstring

        Unique identifier for the object.

      • rows.data.objectstring

        String representing the object’s type. Objects of the same type share the same value.

      • rows.data.dimensionsnullable object

        A set of key-value pairs representing the dimensions of the meter usage.

      • rows.data.ends_attimestamp

        Timestamp indicating the end of the bucket. Measured in seconds since the Unix epoch.

      • rows.data.meternullable string

        The unique identifier for the meter. Null if no meters were provided and usage was aggregated across all meters.

      • rows.data.starts_attimestamp

        Timestamp indicating the start of the bucket. Measured in seconds since the Unix epoch.

      • rows.data.valuefloat

        The aggregated meter usage value for the specified bucket.

    • rows.has_moreboolean

      The value is true if this list has another page of items to fetch.

    • rows.totalinteger

      The total number of items across all pages.

    • rows.urlstring

      The URL where you can access this list.

The Meter Usage Analytics object
{
"object": "billing.analytics.meter_usage",
"refreshed_at": 1735689000,
"livemode": false,
"rows": {
"url": "/v1/billing/analytics/meter_usage",
"has_more": false,
"total": 3,
"data": [
{
"object": "billing.analytics.meter_usage_row",
"starts_at": 1733097600,
"ends_at": 1733184000,
"meter": "mtr_test_61Q8nQMqIFK9fRQmr41CMAXJrFdZ5MnA",
"value": 1500,
"dimensions": {
"model": "gpt-4"
}
},
{
"object": "billing.analytics.meter_usage_row",
"starts_at": 1733184000,
"ends_at": 1733270400,
"meter": "mtr_test_61Q8nQMqIFK9fRQmr41CMAXJrFdZ5MnA",
"value": 2250,
"dimensions": {
"model": "gpt-4"
}
},
{
"object": "billing.analytics.meter_usage_row",
"starts_at": 1733270400,
"ends_at": 1733356800,
"meter": "mtr_test_61Q8nQMqIFK9fRQmr41CMAXJrFdZ5MnA",
"value": 1875,
"dimensions": {
"model": "gpt-4"
}
}
]
}
}