The Meter usage datum object 

Billing
Meter Usage Data
The Meter usage datum object

Attributes

  • objectstring

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

  • dataarray of objects

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

    • data.idstring

      Unique identifier for the object.

    • data.objectstring

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

    • data.bucket_end_timetimestamp

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

    • data.bucket_start_timetimestamp

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

    • data.bucket_valuefloat

      The aggregated meter usage value for the specified bucket.

    • data.dimensionsnullable object

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

    • data.meter_idnullable string

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

  • data_refreshed_attimestamp

    Timestamp indicating how fresh the data is. Measured in seconds since the Unix epoch.

  • livemodeboolean

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

The Meter usage datum object
{
"object": "billing.analytics.meter_usage",
"data_refreshed_at": 1735689000,
"livemode": false,
"data": [
{
"object": "billing.analytics.meter_usage_row",
"bucket_start_time": 1733097600,
"bucket_end_time": 1733184000,
"meter_id": "mtr_1234567890abcdef",
"bucket_value": 1500,
"dimensions": {
"model": "gpt-4"
}
},
{
"object": "billing.analytics.meter_usage_row",
"bucket_start_time": 1733184000,
"bucket_end_time": 1733270400,
"meter_id": "mtr_1234567890abcdef",
"bucket_value": 2250,
"dimensions": {
"model": "gpt-4"
}
},
{
"object": "billing.analytics.meter_usage_row",
"bucket_start_time": 1733270400,
"bucket_end_time": 1733356800,
"meter_id": "mtr_1234567890abcdef",
"bucket_value": 1875,
"dimensions": {
"model": "gpt-4"
}
}
]
}