AppAIGatewayDocs
Applications

Usage and events

Spend, tokens and provider attempts over time, with detailed usage events.

The Usage page shows what the app has done. The Apps list summarises the same numbers for the month.

Daily usage by provider

A stacked daily chart for the last 7, 30 or 90 days, by Cost, Requests or Tokens, one colour per provider.

Breakdown

A table over the same range, grouped by one dimension:

DimensionAnswers
By modelWhich models cost what
By model authorSpend on Google's, OpenAI's or Anthropic's models, on any route
By providerWhich provider type served the traffic
By gatewayTraffic through Cloudflare or Vercel AI Gateway versus direct
By credential sourceYour own key versus a gateway's key
By userWho spent what. On an iOS app, offered when its budget is measured per user
By installWhich install spent what: one copy of an iOS app on one device. Offered on iOS apps whose budget is measured per install, the default
By statusServed requests and provider errors
By cost sourceWhether cost was computed locally, reported by the provider, or unresolved
By routeProvider slug and path
By endpointEach custom endpoint
By app versionThe X-App-Version header, so you can see whether a problem is one release

Columns are Requests, Total input, Cached input, Cache write, Output and Cost. Total input counts every prompt token, including those read from or written to the provider's prompt cache, so the two cache columns are shares of it.

Model, provider and status breakdowns reach back over the whole history. The other dimensions come from the raw event log, which is kept for a bounded period; totals are never lost.

Recent events

Every provider attempt, newest first, with When, User · key (on an iOS app, User · install, naming the install beside the user), Model, Route, Tokens, Cost, Latency and Status. The route shows the endpoint slug where one was used, the gateway it went through, and for OpenRouter the provider that actually served it.

Filter by status:

StatusMeaning
okServed by the provider
provider_errorThe provider refused or failed the request

Requests stopped before contacting a provider appear as samples in Auth & Errors. They do not add usage requests, tokens or cost. Provider errors still appear here because the provider was contacted; a fallback request can have more than one provider attempt.

Where a cost comes from

Each event records how its cost was arrived at.

  • computed: priced locally from the catalog or the provider's custom pricing. This is the normal case.
  • reported: the provider said what the request cost, and that figure is used. xAI and OpenRouter do this.
  • unresolved: the provider answered successfully but reported no usage the gateway could read, so the request consumed no budget. Shown as unresolved rather than $0.00.

The usual cause of an unresolved event is a client that disconnected from a stream before the final chunk carrying the usage arrived. The generation stops when the client disconnects, but what was generated up to then is unmetered. A sustained count of unresolved events on one app or user is worth a look, and per-user rate limits bound how much can go unmetered. See Model pricing.

Through the API

  • GET /v1/admin/apps/{app}/usage?month=YYYY-MM for totals.
  • GET /v1/admin/apps/{app}/usage/timeseries?from=&to= for the daily chart.
  • GET /v1/admin/apps/{app}/usage/breakdown?by=model&from=&to= where by is one of model, model_author, provider, provider_slug, provider_gateway, credential_source, user, install, status, cost_source, route, endpoint, app_version.
  • GET /v1/admin/apps/{app}/events?limit=&status=&user=&install=&model=&before_id= for the event list, paged by next_before_id. Each event carries install_id, the install's App Attest key id on an iOS app and null on a server app.

On this page