Events
List gateway events
Fetch Frontier Gateway billing events over a time window. Cursor-paginated, with optional filters by API key prefix and external entity ID.
Fetch the per-request billing events that Frontier Gateway records for your inference traffic. Each event carries token counts, the calling group’s external entity ID, and the API key prefix that made the request. These are the same
Events come back in ascending timestamp order, with ties broken by
API_BILLING_USAGE events that billing webhooks deliver: use this endpoint to pull them on demand instead of running a webhook receiver. For webhook delivery, signature verification, and retry semantics, see Billing events.
Authentication
Workspace API key with management scope, passed as
Authorization: Bearer $BASETEN_API_KEY (Api-Key is also accepted). Federated gateway keys are rejected: this is an operator endpoint, not an inference credential.Query parameters
Inclusive start of the fetch window, in ISO 8601 UTC, for example
2026-08-01T00:00:00Z. Required unless you pass cursor to continue a previous page.Exclusive end of the window, in ISO 8601 UTC. Defaults to the current time, minus a short ingestion holdback, so events from roughly the last minute aren’t returned yet. The window is evaluated once: the cursor pins it, so pagination continues inside the same window.
Filter to events charged against these API key prefixes, repeated once per prefix, for example
api_keys=sky_abc12345&api_keys=sky_def67890. Omit to return events for all keys.Filter to events for these external entity IDs (the group’s
metadata.external_entity_id), repeated once per ID. Omit to return events for all groups.Pagination cursor from the previous response’s
pagination.cursor. When present, all other parameters are ignored: the cursor carries the window, page size, and filters from the original request. Omit on the first call.idempotencyKey.
Fetched events don’t include the request’s requestMetadata passthrough. If you need it, use billing webhooks instead.