---
title: "Get usage metrics"
method: GET
path: "/usage/metrics"
tags: ["usage"]
---

# Get usage metrics

`GET /usage/metrics`

Returns infrastructure cost and compute-minute summaries for the caller's user over a date range, plus per-bucket chart data. Granularity is hourly (≤24h window) or daily. Pass the window and granularity as query params.

## Query parameters

- `start_date` string, date-time, required — start of reporting window (RFC3339)
- `end_date` string, date-time, required — end of reporting window (RFC3339)
- `granularity` 'hourly' | 'daily' — bucket resolution
- `timezone` string — IANA timezone for bucketing periods (e.g., America/Los_Angeles)

## Response `200`

OK

- UsageMetricsResponse — Usage metrics summary returned by the metrics endpoint.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `compute_minutes` UsageComputeMinutes, required — ComputeMinutes summarizes compute time metrics for a reporting period.
    - `change` number, double, required — Percentage change from the previous period.
    - `chart_data` UsageChartDataPoint[], nullable, required — Time-series breakdown for chart rendering.
      - `is_current` boolean, required — Whether this is the current (in-progress) period.
      - `period` string, required — Human-readable time period label (e.g., '9AM', 'Mon').
      - `timestamp` string, date-time, required — Exact timestamp for this data point.
      - `value` number, double, required — Numeric value for this period.
    - `total_minutes` number, double, required — Total compute minutes used in the period.
  - `cost_by_product` UsageCostByProduct, required — CostByProduct splits the period's usage spend by what was billed (dollars).
    - `inference` number, double, required — Inference spend for the period.
    - `other` number, double, required — Any usage spend not attributable to sessions or inference.
    - `sessions` number, double, required — Phone-session (compute-time) spend for the period.
  - `granularity` 'hourly' | 'daily', required — Data resolution (hourly or daily).
  - `inference_chart_data` UsageChartDataPoint[], nullable, required — Daily inference spend series.
    - `is_current` boolean, required — Whether this is the current (in-progress) period.
    - `period` string, required — Human-readable time period label (e.g., '9AM', 'Mon').
    - `timestamp` string, date-time, required — Exact timestamp for this data point.
    - `value` number, double, required — Numeric value for this period.
  - `infra_costs` UsageInfrastructureCosts, required — InfrastructureCosts summarizes infrastructure cost metrics for a reporting period.
    - `change` number, double, required — Percentage change from the previous period.
    - `chart_data` UsageChartDataPoint[], nullable, required — Time-series breakdown for chart rendering.
      - `is_current` boolean, required — Whether this is the current (in-progress) period.
      - `period` string, required — Human-readable time period label (e.g., '9AM', 'Mon').
      - `timestamp` string, date-time, required — Exact timestamp for this data point.
      - `value` number, double, required — Numeric value for this period.
    - `this_period` number, double, required — Cost accrued in the current period.
    - `total` number, double, required — Total infrastructure cost in dollars for the period.
  - `period_end` string, date-time, required — End of the reporting period.
  - `period_start` string, date-time, required — Beginning of the reporting period.
  - `session_chart_data` UsageChartDataPoint[], nullable, required — Per-product daily spend series for charting.
    - `is_current` boolean, required — Whether this is the current (in-progress) period.
    - `period` string, required — Human-readable time period label (e.g., '9AM', 'Mon').
    - `timestamp` string, date-time, required — Exact timestamp for this data point.
    - `value` number, double, required — Numeric value for this period.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/axilioai/apis/axilio-api.md) · [All operations](https://skmtc.net/axilioai/apis/axilio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/axilioai/axilio-api/revisions/108ab4b41051/schema)
