# Metrics

> Read processing and storage metrics.

Use the Metrics API to read the reports shown in the Chunkify dashboard. Authenticate with a Project token; each response contains only that Project's data.

These reports cover processing and resource usage. For playback engagement, use [Analytics](/docs/integration/analytics/server/query-analytics).

| Report | Contents |
| --- | --- |
| [Usage](/docs/api-reference/metrics/get-usage-metrics)<br/>`GET /metrics/usage` | Daily activity counts, processed seconds, output transfer and credits spent |
| [Assets](/docs/api-reference/metrics/get-asset-metrics)<br/>`GET /metrics/assets` | Asset outcomes, processing times, measured sizes, streaming renditions and source profiles |
| [Storage](/docs/api-reference/metrics/get-storage-metrics)<br/>`GET /metrics/storage` | Recorded additions and successful file removals for persistent storage |

Paths are relative to `https://api.chunkify.dev/v1`.

## Date ranges

Omit `from` and `to` for the past 7 UTC calendar days, including today. Today's values can change as processing continues. For a custom range, supply both dates as `YYYY-MM-DD`. `from` is inclusive and `to` is exclusive.

For example, `from=2026-10-01&to=2026-11-01` selects October. Each request can cover at most 366 days. The limit bounds a request; it does not expire historical data.

Every report includes the resolved `from` and `to`. Daily rows appear oldest first, with zero counters for days without recorded activity. Missing measurements, including timing medians and unmeasured output sizes, are `null`.

Measured zero values stay zero.

The dashboard calendar includes both selected dates and converts the end date to the API's exclusive `to` boundary.

## Reading the reports

Usage comes from durable daily accounting counters. It includes Assets, Transcodings, static renditions, Sources, Uploads, Thumbnails, captions, Notifications, output transfer and credits spent.

Credits are integer wallet units; 10,000 units equal $1 of credits. They measure credit consumption, not cash revenue. Output seconds include audio-only output; audio output seconds are the subset for audio-only files.

Byte values are unformatted bytes.

Asset metrics group saved Assets by creation date. They use retained Asset metadata, including after temporary media expires. Explicitly deleting an Asset removes it from this report, but does not erase its durable usage counters.

Period timing medians use every measured Asset in the selected range, so they must not be calculated by averaging daily medians. Sample counts show how many measurements contributed.

Source profiles count Assets, including Assets that share the same Source.

Storage metrics describe recorded activity, not current bucket occupancy. `bytes_removed` is positive; `net_bytes_change` is additions minus successful removals and can be negative.

Use `storage_id` to select one persistent storage configuration, or omit it to return all eligible configurations. Temporary Chunkify storage is excluded.

Coverage follows lifecycle-event retention, so zero activity does not prove that an older period had no storage changes.

## CSV exports

Add `format=csv` to any metrics endpoint. `Accept: text/csv` also selects CSV. An explicit `format=json` or `format=csv` takes precedence over `Accept`. Unsupported formats return a validation error. Errors always use the normal JSON error response.

CSV contains the same report values in flat columns:

- `row_type` is `summary` or `daily`. Each summary is followed by its daily rows.
- `from` and `to` repeat the report boundaries. `date` is blank for summary rows.
- Storage exports also include `storage_id`, with a summary and daily rows for
  each storage configuration. With no eligible storage, the export has only its
  header.
- Nested names use dots, such as `assets.ready`, `credits_spent.total` and
  `timings.playback_median_seconds`. Map keys become columns, such as
  `sources.assets_by_codec.h264`. Codec columns reflect the selected range.
- Unavailable measurements are blank; genuine zeros are `0`. Integer byte
  counts retain their full precision. Numeric columns follow the identity
  columns in alphabetical order.

Filter on `row_type` before adding values. Adding summary and daily rows together would count the period twice. Summary medians and averages already represent the full selected range.

## MCP

Connect [Chunkify MCP](/docs/integration/chunkify-skill#set-up-your-project), then use `getUsageMetrics`, `getAssetMetrics` or `getStorageMetrics`. Each requires an explicit authorized `project_id` and accepts the same dates and `format` query parameter as the API. JSON is the default.

`format: "csv"` returns CSV text. Storage reports also accept `storage_id`.

The MCP result limit still applies. If an export exceeds it, request a shorter range or select one storage configuration.