megachangelog
Feature

Custom Reporting API for AI Gateway usage now in beta

Vercel's AI Gateway now offers a Custom Reporting API in beta for Pro and Enterprise teams, providing unified visibility into AI spending and usage across providers, models, and customer segments. The API enables cost tracking by model, provider, user ID, and custom tags, eliminating the need for external proxies and manual reconciliation.

If you're shipping AI features, you already have usage data. The problem is that it's split across providers, keys, and dashboards, so it's hard to answer basic questions before the bill shows up.

You've probably felt the drift into after-the-fact reconciliation. Provider consoles only show their own slice, so you end up exporting CSVs, rebuilding views in spreadsheets, and still missing the context that matters, like your tags, feature boundaries, and internal user IDs. When BYOK enters the picture, it gets worse because spend and usage scatter across whatever keys your users bring.

The Custom Reporting API for  is now available in beta for teams on the Pro and Enterprise plans. It gives you programmatic access to cost, token usage, and request volume across your AI Gateway traffic, including BYOK requests.AI Gateway

You can break down spend by model, provider, user ID, custom tag, or credential type. That makes it possible to track costs and usage per feature, per end customer, and per pricing tier from a single endpoint. You can also query it live via Claude Code.

One AI platform aggregating models for 200K+ users previously relied on a separate proxy layer to track costs across providers. During the Custom Reporting private beta, they consolidated cost tracking and request management into a single system, replacing their third-party proxy entirely and saving over $80K.

With Advanced Reporting, they now use custom tags and user IDs to track customers' usage and costs across models, gaining programmatic access to spend data in the same place their inference already runs.

Tag requests with and so you can attribute cost in terms your product and finance teams recognize. If you run a customer-facing AI feature, you can tag each request with the customer ID, their plan, and the feature they are using.usertags

Tagging works with the AI SDK, Chat Completions API, Responses API, OpenResponses API, and Anthropic Messages API. No matter which interface or language you use, the data lands in the same reporting endpoint.

Query the custom reporting endpoint to get answers:

This is where reporting stops being an exercise in reconciliation and starts being something you can run as part of how you operate. You can measure the cost of a single feature across all Enterprise teams, see which free-tier users are nearing the point where they should upgrade, and calculate per-request unit economics before you change pricing.

Everything below works across both BYOK and system credentials. Whether your users bring their own API keys or you pay through AI Gateway credits, the reporting API captures it in one place.

With the results, you can track per-customer and per-feature costs to understand where spend is actually going, monitor internal usage across models and providers to catch spikes before they appear on the bill, and use the data to set budgets, calculate margins, and make pricing decisions based on real unit economics.

Once your traffic runs through a single reporting endpoint, you can treat AI spend like any other production metric. Tag requests the way your product works, query the reporting endpoint on a schedule, and use the results to set budgets, price features, and catch changes in usage before they turn into surprises.

Read the and view .AI Gateway documentationsupported models and providers

Read more

How a platform saved $80K

Implement the reporting API

ai-gatewayreportingapibillinganalyticsbeta

Source: original entry ↗

More from Vercel

Follow Vercel to get its new changes in your feed and email digest.

Feature

OpenAI Decisions API now available on AI Gateway

OpenAI's Decisions API is now accessible through Vercel's AI Gateway with an OpenAI-compatible endpoint, enabling decision models to answer typed questions and return probabilities, choices, and scores for routing, triage, and guardrails use cases. Support is available across the OpenAI SDK, AI SDK, HTTP API, and CLI with the latest versions.

ai-gatewayopenaiapidecisionssdks
Feature

Timestamp attributes now supported in Vercel Flags

Vercel Flags now supports timestamp attributes for entities, allowing you to create time-based targeting rules. Use this feature to run limited-time campaigns, show content between specific dates, or target users based on registration date.

flagstargetingfeaturetimestampscampaigns
Feature

Glyph Cluster now available in stealth on AI Gateway

Glyph Cluster, a reasoning model for coding and long-context analysis, is now available as a stealth model on Vercel's AI Gateway for Pro and Enterprise plan teams with purchased AI Gateway credits at no cost during the stealth period. The model supports function calling, streams responses, and can be accessed via AI SDK, OpenAI-compatible APIs, and coding agents.

ai-gatewaymodelscodingstealth
See all Vercel changes →