---
title: "Count Usage"
method: GET
path: "/v1/usage/count"
tags: ["usage"]
---

# Count Usage

`GET /v1/usage/count`

Total number of usage logs matching the given filters.

Serves the dashboard paginator's "N of M" total without changing the bare
array contract of ``GET /v1/usage``. Runs only when the client asks (a
separate request), so the ``COUNT(*)`` is not paid on every page load.

## Query parameters

- `start_date` string, date-time, nullable — Return logs with timestamp >= start_date (ISO 8601 or Unix epoch seconds)
- `end_date` string, date-time, nullable — Return logs with timestamp < end_date (ISO 8601 or Unix epoch seconds)
- `user_id` string, nullable — Filter to a single user
- `status` string, nullable — Filter to a single status (e.g. 'success' or 'error')
- `model` string, nullable — Filter to a single model
- `endpoint` string, nullable — Filter to a single endpoint (e.g. '/v1/chat/completions')

## Response `200`

Successful Response

- UsageCount — Total number of usage logs matching a set of filters.
  - `total` integer, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-21** `9da977999634` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mozilla-ai/apis/otari/changes/v1/usage/count/get.md)

---

[API](https://skmtc.dev/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.dev/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/66056c7fd2e2/schema)
