AI ゲートウェイにおける API キーの予算管理機能
本文の状態
日本語全文を表示中
詳細モードで約2分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Vercel Blog
Vercel は、コーディングエージェントや実験的なワークフローによる予期せぬコスト増を防ぐため、AI Gateway で API キーごとの支出上限を設定し、超過時にリクエストを拒否する機能を追加した。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
AI コストの予測はますます困難になっています。チームがコーディングエージェントやその他のトークン消費量の多いワークフローにより依存するようになると、あるキーが誰も気づかないうちにコストを急増させる可能性があります:
監督なしでループしたり分岐したりできる自律型ワークフロー
共有またはリリースされた際に予期せぬトラフィックを引き起こす可能性のあるデモやプロトタイプ
モデルごとのコスト感覚を持たずに探索や実験を行う開発者
AI Gateway では、任意のキーに支出上限を設定できます。この上限を超えると、予算がリセットされるか、上限を引き上げるまで、そのキーからの追加リクエストは拒否されます。この上限は、そのキーを介して実行されるすべての AI Gateway プロバイダーとモデルに適用されるため、AI コストの統合とガバナンスが容易になります。
Vercel ダッシュボードにおける API キー予算
AI Gateway の API キーページで「キーの作成」をクリックし、「支出クォータ」オプションを有効にして、ドル単位の制限額を入力し、更新期間を選択してください。
既存のキーも編集でき、右側の...メニューから「キーの編集」をクリックすることで、予算の追加、変更、または削除が可能です。
Vercel CLI における API キーの予算設定
Vercel CLI を使用してプログラム的に予算付き API キーを作成できます。書式は以下の通りです:
キーにオプションの更新期間(日次、週次、月次、またはなし)をペアリングし、制限範囲を特定のウィンドウにスコープします。各期間は UTC 基準でそのウィンドウの開始時にリセットされます。
プログラム的に作成されたキーは、チームの AI Gateway API キー一覧ビューにも表示されるため、すべてのキーを一元管理できます。
API キーの予算設定と使用方法の詳細については、API キードキュメントをご覧ください。
続きを読む
原文を表示
AI costs are getting harder to forecast. As teams lean more on coding agents and other token-heavy workflows, a key can burn cost faster than anyone notices:
Autonomous workflows that can loop or fan out without supervision
Demos and prototypes that could catch unexpected traffic if shared or shipped
Developers exploring or experimenting without a sense of per-model cost
Set a spend cap on any key, and AI Gateway rejects further requests on that key once the limit is exceeded, until the budget resets or you raise it. The cap applies to all AI Gateway providers and models running through the key, making it easier to consolidate and govern AI costs.
API key budgets in the Vercel Dashboard
On the AI Gateway API Keys page, click Create Key, enable the Spend Quota option, enter a limit in dollars, and choose a refresh period.
You can also edit existing keys and add, change, or remove budgets by clicking the right hand side ... menu and Edit Key.
API key budgets in the Vercel CLI
Create a budgeted API key programmatically via the Vercel CLI. The format is:
Pair a key with an optional refresh period (daily, weekly, monthly, or none) to scope the limit to a window. Each period resets at the start of its window in UTC.
Keys created programmatically will also appear in your team AI Gateway API Keys view, so you can see all keys in one place.
Read the API keys documentation for more information about setting and using budgets for API keys.
Read more
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み