---
title: "List usage events"
method: GET
path: "/v1/ai-cost-management/events"
tags: ["usage-events"]
---

# List usage events

`GET /v1/ai-cost-management/events`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-cost-management/events`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Returns a page of the organization's usage events, newest first unless the request sets `sort`. The list includes usage from the gateway and usage reported with `POST /v1/ai-cost-management/events`, each in the `ai.usage.v1` form that producers report. For a caller whose access covers only particular principals or groups, the operation reads only the events of those principals and groups.

The service may return fewer events than requested when the page reaches its byte budget. Follow the page links to continue.

Listed events differ from what producers send:

- `arrival` isn't included, though `filter[arrival]=late` selects late events.
- A quantity or cost the producer didn't report shows as `"0"`.
- `datacontenttype`, `dataschema`, and provenance keys other than the ones this schema lists are left out.

## Query parameters

- `filter` AICostUsageEventFilterParameters: Filters on the usage events' fields. Every filter must match, and a bare value means `eq`. - `source`, `subject_type`, `request_mode`, `provider`, `model`, `model_id`, `region`, `client`: `eq`, `neq`, `oeq`, `contains`, and `ocontains`. - `subject`, `subject_id`: `eq`, `neq`, `oeq`, `contains`, `ocontains`, `exists`, and `nexists`. `exists` and `nexists` take no value, and `filter[subject][nexists]` selects unattributed usage. - `service_id`, `route_id`, `consumer_id`, `application_id`: `eq`, `neq`, and `oeq`, with gateway IDs. - `consumer_group_ids`, `groups`, `teams`: `eq` and `oeq`, which match an event whose list contains the value, or any of the values. Groups are complete group references, `principal/{uuid}`, `consumer_group/{uuid}`, or `oidc/{group}`, and an OIDC group must match in text and case. Teams are complete team references, `principal/{uuid}`. The `{uuid}` in a reference is never the nil UUID. Consumer group IDs are gateway IDs, any 8-4-4-4-12 hexadecimal value, compared ignoring case. - `time`: `eq`, `gt`, `gte`, `lt`, and `lte`, with RFC 3339 timestamps. - `reported_cost`: `eq`, `gt`, `gte`, `lt`, and `lte`, which compare the cost's `value` with an exact decimal string from `0` to `999999999.999999999`. `0` also matches events whose producer omitted the cost, because a missing cost is stored as zero. - `tokens`: `exists` and `nexists`, which take no value. An event has `tokens` when it reports a positive quantity of any token kind other than `reported_total_tokens`. With `filter[reported_cost][eq]=0`, `filter[tokens][exists]` selects the unpriced events. - `arrival`: `eq`, `neq`, and `oeq`, with `late` or `on_time`. An event is `late` when it reached the service more than 1 hour after its `time`. - `tags.<key>`: `eq`, `neq`, `oeq`, `contains`, `ocontains`, `exists`, and `nexists`. A bare key with no value, as in `filter[tags.env]`, matches events that have the tag, and `eq` with an empty value matches events without it. Each value, including each part of an `oeq` or `ocontains` list, has at most 256 characters, none of them a control character. Any other filter key fails with `400`. `eq`, `neq`, and `oeq` compare strings case-sensitively, and `contains` and `ocontains` ignore case. Gateway IDs compare case-insensitively.
  - `source` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `subject_type` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `subject` AICostOptionalStringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
    - `exists` '': Always empty, because the operator takes no value.
    - `nexists` '': Always empty, because the operator takes no value.
  - `subject_id` AICostOptionalStringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
    - `exists` '': Always empty, because the operator takes no value.
    - `nexists` '': Always empty, because the operator takes no value.
  - `request_mode` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `time` union: Filters on the given datetime (RFC-3339) field value.
    - object
      - `eq` string, date-time, required: Value strictly equals given RFC-3339 formatted timestamp in UTC
    - object
      - `lt` string, date-time, required: Value is less than the given RFC-3339 formatted timestamp in UTC
    - object
      - `lte` string, date-time, required: Value is less than or equal to the given RFC-3339 formatted timestamp in UTC
    - object
      - `gt` string, date-time, required: Value is greater than the given RFC-3339 formatted timestamp in UTC
    - object
      - `gte` string, date-time, required: Value is greater than or equal to the given RFC-3339 formatted timestamp in UTC
  - `reported_cost` union: Filters a decimal field by an exact value or a range. Values compare as exact decimals, without rounding. Filters on the same field must all match, so a lower and an upper bound together select an interval.
    - string: A bare decimal string, which means `eq`.
    - AICostReportedCostFieldEqualsFilter: Matches a value equal to the given decimal string.
      - `eq` string, required: The decimal string to compare with.
    - AICostReportedCostFieldGTFilter: Matches a value greater than the given decimal string.
      - `gt` string, required: The decimal string to compare with.
    - AICostReportedCostFieldGTEFilter: Matches a value greater than or equal to the given decimal string.
      - `gte` string, required: The decimal string to compare with.
    - AICostReportedCostFieldLTFilter: Matches a value less than the given decimal string.
      - `lt` string, required: The decimal string to compare with.
    - AICostReportedCostFieldLTEFilter: Matches a value less than or equal to the given decimal string.
      - `lte` string, required: The decimal string to compare with.
  - `tokens` union: Filters a field only by whether it has a value, with `exists` or `nexists`. Neither operator takes a value.
    - AICostFieldExistsFilter: Matches a field that has a value. The operator takes no value, as in `filter[field][exists]`.
      - `exists` '', required: Always empty, because the operator takes no value.
    - AICostFieldNExistsFilter: Matches a field that has no value. The operator takes no value, as in `filter[field][nexists]`.
      - `nexists` '', required: Always empty, because the operator takes no value.
  - `provider` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `model` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `model_id` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `region` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `client` StringFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`, `contains`, `ocontains`
    - `eq` string: The field exactly matches the provided value.
    - `contains` string: The field contains the provided value.
    - `ocontains` string: The field contains any of the provided values.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `service_id` UuidFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`
    - `eq` string: The field exactly matches the provided value.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `route_id` UuidFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`
    - `eq` string: The field exactly matches the provided value.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `consumer_id` UuidFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`
    - `eq` string: The field exactly matches the provided value.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `consumer_group_ids` AICostReferenceFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`
    - `eq` string: The field exactly matches the provided value.
    - `oeq` string: The field matches any of the provided values.
  - `groups` AICostReferenceFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`
    - `eq` string: The field exactly matches the provided value.
    - `oeq` string: The field matches any of the provided values.
  - `teams` AICostReferenceFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`
    - `eq` string: The field exactly matches the provided value.
    - `oeq` string: The field matches any of the provided values.
  - `application_id` UuidFieldFilter: Filter using **one** of the following operators: `eq`, `oeq`, `neq`
    - `eq` string: The field exactly matches the provided value.
    - `oeq` string: The field matches any of the provided values.
    - `neq` string: The field does not match the provided value.
  - `arrival` union: Filters a field by its value with `eq`, `neq`, or `oeq`. Accepts `on_time` and `late`. A bare value means `eq`.
    - 'on_time' | 'late': Whether an event arrived late. An event is `late` when it reached the service more than 1 hour after its `time`, and `on_time` otherwise.
    - AICostArrivalFieldEqualsFilter: Matches a value equal to the given one.
      - `eq` 'on_time' | 'late', required: The value to match.
    - AICostArrivalFieldNEQFilter: Matches a value other than the given one.
      - `neq` 'on_time' | 'late', required: The value to exclude.
    - StringFieldOEQFilter: Returns entities that exact match any of the comma-delimited phrases in the filter string.
      - `oeq` string, required
- `sort` string
- `page[size]` integer
- `page[after]` string
- `page[before]` string

## Response `200`

A page of usage events.

- object
  - `data` AICostUsageEvent[], required: The usage events on this page, in `sort` order. Each has the `ai.usage.v1` form that producers report.
    - `specversion` '1.0', required: The CloudEvents version that the event follows. Always `1.0`.
    - `id` string, required: Identifies the invocation. `source` and `id` together identify the event. The `id` is unique within `source` and stays the same when the producer delivers the same invocation again. A client's retry of a model call is a separate invocation with its own `id`. A gateway event's `id` begins with `{request_id}/`.
    - `type` 'ai.usage.v1', required: The CloudEvents type of the event. Always `ai.usage.v1`: the event records one billable call to an AI model (an invocation).
    - `source` string, required: Identifies the producer of the event, as a URI reference. `//control-planes/{uuid}` names the Konnect control plane of the gateway that served the request, and `//principals/{uuid}` names the principal that reported the event through `POST /v1/ai-cost-management/events`.
    - `subject` string: The actor accountable for the invocation, as a reference in `type/id` form: - `principal/{uuid}`: a Kong Identity principal. This is the preferred form. - `consumer/{uuid}`: a gateway consumer or an AI Gateway consumer. - `oidc/{sub}`: the `sub` claim of the caller's OIDC credential, when nothing else identifies the caller. A UUID is lowercase and can't be the nil UUID. A `sub` has 1 to 255 characters and no line break. The event omits `subject` when no accepted identity is known, which leaves the usage unattributed.
    - `time` string, date-time, required: When the invocation started, as an RFC 3339 timestamp with `Z` or a UTC offset. It has at most 9 fractional-second digits. The event list returns it in UTC, at millisecond precision.
    - `datacontenttype` 'application/json': The media type of `data`. Always `application/json`. The event list doesn't return it.
    - `dataschema` string, uri: The URI of the JSON Schema that `ai.usage.v1` events follow. The event list doesn't return it.
    - `traceparent` string: The W3C Trace Context `traceparent` of the model call, from the CloudEvents distributed tracing extension. Set only from a complete and valid `traceparent` value. A trace ID in another format belongs in `provenance`.
    - `tracestate` string: The W3C Trace Context `tracestate` that goes with `traceparent`.
    - `data` object, required: The usage the event reports: `quantities`, `reported_cost`, `reported_cache_cost`, `context`, and `optimization`, plus the `provenance`, `tags`, `groups`, and `teams` that attribute it.
      - `quantities` object, required: The quantities the invocation used, keyed by kind. Each value is a count in the kind's unit, such as tokens or milliseconds. An omitted kind is unknown, not zero, and the object can be empty. A kind not listed here isn't accepted. The event list returns every kind and shows an unreported kind as `"0"`.
        - `input_tokens` string, required: Uncached input tokens, without a per-modality breakdown. A producer reports either this total or the per-modality uncached input kinds, such as `input_text_tokens`. When both appear, they can count the same tokens.
        - `input_text_tokens` string, required: Uncached text input tokens.
        - `input_audio_tokens` string, required: Uncached audio input tokens.
        - `input_image_tokens` string, required: Uncached image input tokens.
        - `input_cache_read_tokens` string, required: Input tokens read from the provider's cache, without a per-modality breakdown. They aren't part of uncached input or cache writes. A producer reports either this total or the per-modality cache-read kinds, such as `input_cache_read_text_tokens`. When both appear, they can count the same tokens.
        - `input_cache_read_text_tokens` string, required: Cache-read text input tokens.
        - `input_cache_read_audio_tokens` string, required: Cache-read audio input tokens.
        - `input_cache_read_image_tokens` string, required: Cache-read image input tokens.
        - `input_cache_read_video_tokens` string, required: Cache-read video input tokens.
        - `input_cache_write_tokens` string, required: Input tokens written to the provider's cache, without a per-modality breakdown. They aren't part of uncached input or cache reads. A producer reports either this total or the per-modality cache-write kinds, such as `input_cache_write_text_tokens`. When both appear, they can count the same tokens.
        - `input_cache_write_text_tokens` string, required: Cache-write text input tokens.
        - `input_cache_write_audio_tokens` string, required: Cache-write audio input tokens.
        - `input_cache_write_image_tokens` string, required: Cache-write image input tokens.
        - `input_cache_write_video_tokens` string, required: Cache-write video input tokens.
        - `output_tokens` string, required: Output tokens, without a per-modality breakdown. A producer reports either this total or the per-modality output kinds, such as `output_text_tokens`. When both appear, they can count the same tokens.
        - `output_text_tokens` string, required: Text output tokens.
        - `output_audio_tokens` string, required: Audio output tokens.
        - `output_reasoning_tokens` string, required: Reasoning output tokens.
        - `accepted_prediction_tokens` string, required: Prediction tokens that the provider reports as accepted.
        - `rejected_prediction_tokens` string, required: Prediction tokens that the provider reports as rejected.
        - `realtime_audio_ms` string, required: The duration of realtime audio, in milliseconds.
        - `reported_total_tokens` string, required: The provider's own total token count, kept to reconcile against the other kinds. It isn't billable and never enters a cost. A producer sends it only when the provider reports it, never as a sum of other kinds.
      - `reported_cost` AICostMoney, required: The producer's estimate of the invocation's cost, such as `{"value": "0.0054", "currency": "USD"}`. Usage queries, forecasts, and budgets sum it as reported. `value` is `0` to `999999999.999999999`, with at most 9 digits before the decimal point and at most 9 after it. It has no sign, no exponent, and no extra leading zeros (`0.5` is valid, `00.5` isn't). Trailing fractional zeros are accepted, and the event list returns the value without them. An omitted cost is unknown, not zero. A producer that knows the cost is zero sends a `value` of `"0"`. The event list returns an omitted cost with a `value` of `"0"`.
        - `value` string, required: The amount in major units of `currency`, as a canonical decimal string such as `4125.5` or `0.004372`: at most 9 fractional digits, no trailing fractional zeros, no exponent, and a leading `-` only when the amount is negative.
        - `currency` 'USD', required: The currency of `value`.
      - `reported_cache_cost` AICostMoney, required: The producer's estimate of the part of `reported_cost` that comes from cache reads and cache writes. Its `value` has the same format and bounds as `reported_cost`'s. An omitted value is unknown, not zero. The event list returns it with a `value` of `"0"`.
        - `value` string, required: The amount in major units of `currency`, as a canonical decimal string such as `4125.5` or `0.004372`: at most 9 fractional digits, no trailing fractional zeros, no exponent, and a leading `-` only when the amount is negative.
        - `currency` 'USD', required: The currency of `value`.
      - `context` object, required: What served the invocation and how: the `provider` and `model`, the model's registry identifier in `model_id`, the `request_mode`, the provider's `region`, and the calling tool in `client`. The producer omits each field it doesn't know. A field that's present is never empty.
        - `provider` string: The AI provider that served the invocation.
        - `model` string: The model that served the invocation, as the provider reports it, after any alias resolution, route selection, fallback, or enforced downgrade. When the provider doesn't report it, the producer omits `model` rather than putting the requested model in its place.
        - `model_id` string: The producer's stable identifier for the model in its model registry.
        - `request_mode` 'stream' | 'oneshot' | 'realtime': How the invocation was served: `stream`, `oneshot`, or `realtime`.
        - `region` string: The region of the provider that served the invocation, not the region of the gateway's data plane.
        - `client` string: The tool that made the call, such as `claude_code`, `codex`, or `copilot`, as a normalized identifier. The caller can influence it, so it isn't verified.
      - `optimization` object: Evidence about cost-saving mechanisms applied to the invocation: a semantic cache and prompt compression. Nothing in it is billable or enters a cost.
        - `semantic_cache` object: Evidence from the semantic cache lookup for the invocation.
          - `status` string: The semantic cache's status for the invocation, in the producer's own terms.
          - `embeddings_provider` string: The provider of the embedding model that the cache lookup used.
          - `embeddings_model` string: The embedding model that the cache lookup used.
          - `embeddings_tokens` string: The number of tokens that the cache lookup embedded.
        - `compression` object: Evidence from prompt compression for the invocation.
          - `status` string: The prompt compression status for the invocation, in the producer's own terms.
          - `input_tokens_before` string: The total input tokens before compression. After compression, the total input is the sum of the uncached, cache-read, and cache-write input quantities.
      - `provenance` object, required: Identifiers from the producer's own systems: the gateway entities and configuration that handled the request, the identity evidence behind `subject`, and identifiers that correlate the event with other data. At most 64 entries, each with a key of 1 to 128 characters. The keys this schema lists have fixed types. Any other key takes a non-empty string, which the event list doesn't return.
        - `request_id` string: The identifier of the request that made the invocation, for correlating the event with other data.
        - `workspace_id` string, uuid: The gateway workspace that handled the request.
        - `service_id` string, uuid: The gateway service that handled the request.
        - `route_id` string, uuid: The gateway route that the request matched.
        - `plugin_id` string, uuid: The gateway AI plugin that handled the invocation.
        - `consumer_id` string, uuid: The gateway consumer that made the request.
        - `consumer_group_ids` string[]: The gateway consumer groups that the request's consumer belongs to. At most 64 identifiers.
        - `application_id` string, uuid: The application that made the request.
      - `tags` object, required: Key-value context that the caller controls, such as a `project` or `scm-repository` tag, used to attribute and group usage. At most 64 tags. A key has 1 to 128 characters, each a lowercase ASCII letter, a digit, `.`, `_`, or `-`. A value has 1 to 256 characters, none of them a control character. Values are case-sensitive. Key order carries no meaning, and the service sorts tags by key.
      - `groups` string[]: The groups the usage belongs to: every group the producer knows, as the producer supplies them. Each is a reference in `type/id` form: `principal/{uuid}` for a Kong Identity group, `consumer_group/{uuid}` for a Kong consumer group, or `oidc/{group}` for an OIDC group. The service doesn't verify them, and none is the primary group. At most 328 references, each listed once. A UUID is lowercase. An OIDC group has 1 to 255 characters, contains no comma or line break, and keeps its text and case. The service sorts the references lexicographically.
      - `teams` string[]: The Kong Identity teams the usage belongs to, as the producer supplies them. Each is a `principal/{uuid}` reference to a Kong Identity principal group of type `team`. The service doesn't verify them, and none is the primary team. A `team` tag is an ordinary tag and doesn't fill `teams`. At most 200 references, each listed once. A UUID is lowercase. The service sorts the references lexicographically.
  - `meta` CursorMeta, required: Pagination metadata.
    - `page` CursorMetaPage, required
      - `first` string, path: URI to the first page
      - `last` string, path: URI to the last page
      - `next` string, path, nullable, required: URI to the next page
      - `previous` string, path, nullable, required: URI to the previous page
      - `size` number, required: Requested page size

## Other responses

- `400`: A query parameter is invalid. `invalid_parameters` names each invalid parameter.
- `401`: The request has no valid access token. The token is missing, malformed, or expired, or it fails another check, and the response doesn't say which.
- `403`: The access token is valid, but its principal lacks the permission this operation requires. For an operation on one resource, the response doesn't reveal whether that resource exists.

## Changes

- **2026-11-19** `3b071797f6e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v1/ai-cost-management/events/get.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
