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

# GET /ai/usage/by-project

`GET /ai/usage/by-project`

## Request

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

## Query parameters

- `from` string
- `to` string
- `limit` integer

## Response `200`

Spend and volume per project, most expensive first

- ProjectUsage[]
  - `byok_request_count` integer, required: Requests served with a caller-supplied provider key (not operator spend)
  - `error_count` integer, required
  - `estimated_cost_microcents` integer, required: Estimated cost in microcents (1/10000 of a cent), from the model price list
  - `input_tokens` integer, required
  - `monthly_budget_microcents` integer, nullable: The project's effective monthly budget after inheritance, in microcents; `null` when it has no cap. Left `None` by the usage service and filled in by the handler, which owns the link to the limits service.
  - `operator_cost_microcents` integer, required: The part of `estimated_cost_microcents` the operator pays for: requests made with a caller-supplied provider key are excluded. This is the figure a project's monthly budget is measured against.
  - `output_tokens` integer, required
  - `project_id` integer, required
  - `request_count` integer, required

## Other responses

- `400`: Invalid query parameters
- `401`: Unauthorized
- `403`: Requires an instance administrator

## Changes

> 81 revisions in range; 1 not diffed.

- **2026-10-16** `6e7c89bf1ab4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/usage/by-project/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/ab6d5d19e930?raw)
