UsageReport

Usage of one application

Changed on

Token, cost, traffic and live budget figures for the application addressed by its application key, plus the breakdown per API client. Application consumption is read from the traffic log, so it is bounded by the log's retention and, for traffic written before 2026.09.2, attributable only through the application's own credentials.

get/apiops/projects/{projectName}/applications/{applicationKey}/usage

Request

Path parameters

projectNamestring required

Project name

applicationKeystring required

Application key

Query parameters

fromstring

Start of the period, ISO-8601 UTC (2026-08-01, 2026-08-01T00:00:00Z or an offset date-time). Defaults to 30 days before 'to'.

tostring

End of the period, ISO-8601 UTC. Defaults to now. The period may not be inverted or wider than 366 days.

modelstring

Exact LLM model id (e.g. gpt-5). Narrows the whole report to that model's requests and keeps the scope-total budget rows.

environmentNamestring

Environment name. Defaults to every environment of the project. Applies to traffic-log blocks only; filters.environmentApplied reports whether it took effect.

Response

successful operation!

aiLicensedboolean

Whether the AI Gateway module is licensed on this installation. Informational only — the blocks below are answered either way.

budgetsAsOfstring

How fresh the budget rows are (the quota snapshot's last sync, about one minute behind the gateway).

partialboolean

True when at least one source could not be read; the answer is still 200 with what was readable.

unavailableEnvironmentsstring[]

Names of the environments whose traffic log could not be read.

notesstring[]

Machine-readable notes explaining zero or missing numbers.

Example response

{
  "period": {
    "from": "2026-08-12T00:00:00Z",
    "to": "2026-09-11T00:00:00Z",
    "timeZone": "UTC"
  },
  "budgetsAsOf": "2026-09-11T08:31:02Z"
}

Changes