---
title: "GET /ai/usage/summary"
method: GET
path: "/ai/usage/summary"
tags: ["AI Gateway Usage"]
---

# GET /ai/usage/summary

`GET /ai/usage/summary`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/usage/summary`
- Auth: HTTP bearer

## Query parameters

- `from` string
- `to` string
- `project_id` integer

## Response `200`

Usage summary for the time range

- UsageSummary
  - `avg_latency_ms` number, double, required
  - `byok_count` integer, required
  - `error_count` integer, required
  - `priced_requests` integer, required: Requests that used tokens and whose cost a known price gave, zero included. With `unpriced_requests` it tells a window with no priced request (no total to show) from one whose total is partial; requests that used no tokens (failures) are in neither.
  - `streaming_count` integer, required
  - `total_cost_microcents` integer, required
  - `total_input_tokens` integer, required
  - `total_output_tokens` integer, required
  - `total_requests` integer, required
  - `total_tokens` integer, required
  - `unpriced_requests` integer, required: Requests that used tokens but whose cost no known price gave: logged before costs were estimated, or served by a model with no published price (a self-hosted server). A model with a published price of zero is priced, not counted here. `total_cost_microcents` leaves these out, so a client shows the total as partial, or unknown when every request is unpriced, rather than as free.

## Other responses

- `400`: Invalid query parameters
- `401`: Unauthorized
- `403`: Insufficient permissions

## Changes

- **2026-11-15** `425407c64564`: 1 info
  - added the required property `priced_requests` to the response with the `200` status
- **2026-11-15** `ddffcdcaaa91`: 1 info
  - added the required property `unpriced_requests` to the response with the `200` status
- **2026-11-09** `12896146b193`: 3 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
- **2026-10-16** `6e7c89bf1ab4`: 1 info
  - added the new optional `query` request parameter `project_id`
- **2026-10-05** `4b228ebed583`: 3 info
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/usage/summary/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
