---
title: "Get Usage Statistics"
method: GET
path: "/api/assistant/admin/stats"
tags: ["Assistant"]
---

# Get Usage Statistics

`GET /api/assistant/admin/stats`

Retrieve usage statistics of the AI assistant over a specified date range for every user.

## Query parameters

- `range` string, required
- `zone` string, required
- `format` string, required

## Response `200`

Usage statistics for the AI assistant

- ModelUserUsage[]
  - `modelUsage` object — Usage statistics per model@adapter combination.
  - `totalCredits` integer — The total credits used by the user in the date range.
  - `totalInputTokens` integer — The total input tokens used by the user in the date range.
  - `totalMessages` integer — The total messages sent and received by the user in the date range.
  - `totalOutputTokens` integer — The total output tokens used by the user in the date range.
  - `totalSessions` integer — The total sessions the user has added a message to in the date range.
  - `userId` string — The Id of the user.

## Other responses

- `400` — The provided date range is invalid or missing
- `401` — Request was not properly authenticated
- `403` — Insufficient permissions for this request
- `500` — Internal SOC error; review SOC logs

---

[API](https://skmtc.net/security-onion-solutions/apis/security-onion-connect-api.md) · [All operations](https://skmtc.net/security-onion-solutions/apis/security-onion-connect-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/security-onion-solutions/security-onion-connect-api/revisions/0576ce393f8d/schema)
