Get usage metrics
Changed onReturns your organization's usage spend over a window as points: one per hour or day in time_zone (and per group with group_by: product, agent, model, api_key, schedule or device_class), each with the total, phone-session and inference spend in microdollars, the phone seconds and tokens it bought, zero when nothing was billed. The window defaults to the last 7 days and may start at most a year back; hour buckets need a window of 7 days or less.
Request
- Base URLhttps://api.axilio.ai/api/v1
- AuthAPI key in header X-Axilio-Api-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Start of the window (RFC 3339). Defaults to 7 days before period_end_at, and may be at most a year before now.
End of the window (RFC 3339). Defaults to now, and a later time is read as now.
Bucket size: hour or day. hour is allowed for windows of 7 days or less.
IANA time zone the buckets follow, such as America/Los_Angeles: a day starts at local midnight and an hour on the local hour. An unknown name is an error.
Split each bucket by product (session or inference), agent, model, api_key, schedule or device_class. Omit for one point per bucket.
Response
OK
Changes
- info
added the new enum value
agentto thequeryrequest parametergroup_by - info
added the new enum value
api_keyto thequeryrequest parametergroup_by - info
added the new enum value
device_classto thequeryrequest parametergroup_by - info
added the new enum value
modelto thequeryrequest parametergroup_by - info
added the new enum value
scheduleto thequeryrequest parametergroup_by - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status - info
added the required property
//to the response with the status
- info
- breaking
for the
queryrequest parametergranularity, default value was changed fromdailytoday - breaking
removed the enum value
dailyfrom thequeryrequest parametergranularity - breaking
removed the enum value
hourlyfrom thequeryrequest parametergranularity - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - breaking
removed the required property
from the response with the status - warning
deleted the
queryrequest parameterend_date - warning
deleted the
queryrequest parameterstart_date - warning
deleted the
queryrequest parametertimezone - info
added the new optional
queryrequest parametergroup_by - info
added the new optional
queryrequest parameterperiod_end_at - info
added the new optional
queryrequest parameterperiod_start_at - info
added the new optional
queryrequest parametertime_zone - info
added the new enum value
dayto thequeryrequest parametergranularity - info
added the new enum value
hourto thequeryrequest parametergranularity - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the required property
to the response with the status
- breaking