Skip to main content

Custom reporting now available on AI Gateway

By Steven Van ·

The beta Custom Reporting API groups AI Gateway spend by model, provider, user, tag or credential type, for Pro and Enterprise plans.

Vercel's AI Gateway has a Custom Reporting API, in beta for Pro and Enterprise users. According to the documentation, it breaks down cost and token use by model, provider, user, custom tag or credential type, including bring-your-own-key (BYOK) requests. Because inference already runs through AI Gateway, the data is already there, and the API makes it queryable without separate provider consoles or a third-party cost-tracking proxy.

To attribute spend, requests carry a user and/or tags, for example by customer, feature, team or environment. These can be set in providerOptions.gateway with the AI SDK, Chat Completions API, Responses API, OpenResponses API or Anthropic Messages API. They can also be sent as ai-reporting-tags and ai-reporting-user HTTP headers, which suits a proxy layer that adds context without changing application code. Reports are pulled from GET https://ai-gateway.vercel.sh/v1/report with a date range and a group_by parameter. The API is scoped to the whole account, so a key returns usage for everything on it.

Reporting is billed separately:

  • $0.075 per 1,000 unique tag or user ID values written per request
  • $5 per 1,000 queries to the reporting endpoint
Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Original source

Read Custom reporting now available on AI Gateway on Creators Toolbox