---
title: "Get Ai Usage Stats"
method: GET
path: "/admin/ai-usage/stats"
tags: ["admin"]
---

# Get Ai Usage Stats

`GET /admin/ai-usage/stats`

## Request

- Base URL: `https://studio-api.meganova.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://studio-api.meganova.ai/admin/ai-usage/stats`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

Get aggregate AI usage statistics.

## Query parameters

- `user_id` string, uuid, nullable

## Response `200`

Successful Response

- AIUsageStatsResponse
  - `total_requests` integer, required
  - `total_prompt_tokens` integer, required
  - `total_completion_tokens` integer, required
  - `total_tokens` integer, required
  - `total_cost` string, required
  - `total_credits` integer
  - `average_duration_ms` number, nullable
  - `user_id` string, uuid, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `c683584f6060`: 1 info
  - the `total_cost` response's property pattern `^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$` was removed for the status `200`

[Operation history](https://skmtc.dev/meganova/apis/meganova-api/changes/admin/ai-usage/stats/get.md)

---

[API](https://skmtc.dev/meganova/apis/meganova-api.md) - [All operations](https://skmtc.dev/meganova/apis/meganova-api/llms.txt) - [OpenAPI document](https://skmtc.dev/meganova/apis/meganova-api/revisions/c683584f6060?raw)
