Usage Metrics
These endpoints return usage metrics for requests made through AI Runtime Control, including request counts, session counts, and token consumption. Metrics can be filtered by virtual key, provider, and model.
Data model
A usage metric measured for a single date (or hour, when `granularity` is `hourly`).
date | string | The date (or hour) the usage was measured. Formatted as YYYY-MM-DD when
granularity is daily, or YYYY-MM-DD HH:00:00 when granularity is hourly. Required. | |
model | string | The AI model identifier used. | |
primary_provider | string | The ID of the provider connection originally requested, before any failover occurred. | |
provider | string | The name of the provider connection that ultimately served the request. | |
provider_connection_id | string | The ID of the provider connection that ultimately served the request. | |
quantity | integer | The quantity of the usage type for this date. Required. | |
usage_type | string | The type of usage being measured. Required. | |
virtual_key_id | string | The ID of the virtual key this usage is attributed to. | |
virtual_key_name | string | The display name of the virtual key this usage is attributed to. | |
sort | string | The sort value used when making the request. | |
total | integer | The count of results matching the request. | |
meta | object | Metadata about the request. |