---
title: "Get Ai Usage By Operation"
method: GET
path: "/admin/ai-usage/by-operation"
tags: ["admin"]
---

# Get Ai Usage By Operation

`GET /admin/ai-usage/by-operation`

Get usage breakdown by operation type.

## Query parameters

- `user_id` string, uuid, nullable

## Response `200`

Successful Response

- UsageByOperationResponse[]
  - `operation_type` string, required
  - `count` integer, required
  - `total_tokens` integer, required
  - `total_cost` string, required
  - `total_credits` integer
  - `average_duration_ms` number, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/meganova/apis/fastapi.md) · [All operations](https://skmtc.net/meganova/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/meganova/fastapi/revisions/2b2bab8b9017/schema)
