全AIゲートウェイ使用状況の統合レポート
VercelはAI Gateway向けにカスタムレポートAPIをベータ公開し、複数のAIプロバイダーやBYOK(Bring Your Own Key)にまたがる利用状況、コスト、トークン使用量を単一エンドポイントでプログラム的に追跡・分析できるようにした。
キーポイント
統合レポートによる可視化の実現
複数のAIプロバイダー、APIキー、ダッシュボードに分散していた利用データを単一のレポートエンドポイントに統合し、モデル、プロバイダー、ユーザーID、カスタムタグ、認証タイプ別にコストと使用量を追跡できる。
BYOKを含む包括的な対応
ユーザーが独自のAPIキーを持ち込むBYOK(Bring Your Own Key)リクエストも含め、すべてのAI Gatewayトラフィックのコスト、トークン使用量、リクエスト量をプログラム的にアクセス可能にした。
実用的なコスト管理と分析機能
機能別、エンド顧客別、価格帯別のコスト追跡、予算設定、利益率計算、価格決定のためのデータ提供が可能で、あるプラットフォームでは80,000ドルのコスト削減を実現した事例がある。
多様なインターフェース対応とタグ付け
AI SDK、Chat Completions API、Responses API、OpenResponses API、Anthropic Messages APIなど多様なインターフェースでタグ付けが機能し、顧客ID、プラン、使用機能などのコンテキストを付与できる。
影響分析・編集コメントを表示
影響分析
この発表は、複数のAIモデルを利用する企業やプラットフォームにとって、コスト管理と利用分析の大きな課題を解決する実用的なソリューションを提供する。特にBYOK環境での利用データの散逸問題に対処することで、AIサービス提供者の運用効率と財務可視性を大幅に向上させる可能性がある。
編集コメント
AIサービス提供者にとって切実なコスト管理と利用分析の課題に直接応える実用的な機能発表。特にBYOK環境での統合管理は業界のニーズを捉えた重要な進展と言える。
AI GatewayのカスタムレポートAPI(ベータ版)提供開始:使用量とコストを単一エンドポイントで可視化
AI機能を提供しているなら、使用データは既にお持ちでしょう。問題は、そのデータがプロバイダー、APIキー、ダッシュボードごとに分散しているため、請求書が届く前に基本的な質問に答えるのが難しいことです。
多くの場合、後からの照合作業に追われているのではないでしょうか。各プロバイダーのコンソールは自社のデータしか表示しないため、結局CSVをエクスポートし、スプレッドシートでビューを再構築することになり、タグ、機能の境界、内部ユーザーIDといった重要なコンテキストを見落としてしまいます。BYOK(Bring Your Own Key)が導入されると、状況はさらに悪化します。支出と使用量が、ユーザーが持ち込んだ様々なキーに散らばってしまうからです。
この度、AI Gateway の Custom Reporting API が、ProおよびEnterpriseプランのチーム向けにベータ版として利用可能になりました。これにより、BYOKリクエストを含むAI Gatewayトラフィック全体の、コスト、トークン使用量、リクエスト量にプログラムでアクセスできるようになります。
支出をモデル、プロバイダー、ユーザーID、カスタムタグ、認証情報タイプごとに分類可能です。これにより、単一のエンドポイントから、機能ごと、エンド顧客ごと、価格帯ごとのコストと使用量を追跡できます。また、Claude Code を介してライブでクエリを実行することもできます。
あるプラットフォームが8万ドルを節約した事例
20万人以上のユーザーにモデルを提供するあるAIプラットフォームは、以前はプロバイダー間のコストを追跡するために別個のプロキシ層に依存していました。Custom Reportingのプライベートベータ期間中、彼らはコスト追跡とリクエスト管理を単一システムに統合。サードパーティ製プロキシを完全に置き換え、8万ドル以上を節約しました。
Advanced Reporting を活用し、彼らは現在、カスタムタグとユーザーIDを使って顧客の使用量とコストをモデル横断で追跡。推論が既に実行されている同じ場所で、支出データにプログラムからアクセスできるようになっています。
レポートAPIの実装方法
リクエストにユーザー情報とタグを付与すれば、自社の製品チームや財務チームが理解できる形でコストを紐付けることができます。顧客向けAI機能を提供している場合、各リクエストに顧客ID、プラン、利用機能をタグ付けできます。
タグ付けは、AI SDK、Chat Completions API、Responses API、OpenResponses API、Anthropic Messages API でご利用いただけます。どのインターフェースや言語を使用しても、データはすべて同じレポート用エンドポイントに集約されます。
カスタムレポートエンドポイントへのクエリ実行
ここから先、レポートは単なる照合作業ではなく、日常業務の一部として実行できるものになります。例えば、全Enterpriseチームにわたる単一機能のコストを測定したり、アップグレードが必要となる水準に近づいている無料枠ユーザーを特定したり、価格改定前にリクエスト単位の収支を計算したりできます。
以下の機能はすべて、BYOKとシステム認証情報の両方で動作します。ユーザーが独自のAPIキーを持ち込む場合でも、AI Gatewayのクレジットを通じてお支払いいただく場合でも、レポートAPIが一元的に捕捉します。
得られた結果を用いて、以下のことが可能です:
- 顧客ごと、機能ごとのコストを追跡し、支出の実態を把握
- モデルやプロバイダー間の内部使用状況を監視し、請求書に響く前に急増をキャッチ
- データに基づき予算を設定、マージンを計算し、実際の単位収支に基づいた価格決定を実施
トラフィックが単一のレポートエンドポイントを経由するようになれば、AI関連支出も他の本番環境メトリクスと同様に扱えるようになります。ご自身の製品に合わせてリクエストにタグ付けし、定期的にレポートエンドポイントにクエリを実行。その結果を用いて予算を設定し、機能の価格決定を行い、使用量の変化による「想定外」を未然に防ぎましょう。
AI Gateway のドキュメントをお読みいただき、サポートされているモデルとプロバイダーをご確認ください。
続きを読む
原文を表示
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 AI Gateway 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.
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.
How a platform saved $80K
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.
Implement the reporting API
Tag requests with user and tags 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.
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 AI Gateway documentation and view supported models and providers.
Read more
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み