OpenAICloudflare Developer PlatformJun 5, 2026, 12:00 AM

AI Gateway - Control AI costs with spend limits

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

AI Gateway — Control AI costs with spend limits

Key Points

  • Blocks requests when budget exceeded
  • Scope by model, provider, or metadata
  • Supports Unified Billing and BYOK

Summary

AI Gateway now supports spend limits: dollar-based budgets that track cumulative cost (token usage × model pricing) and automatically block requests when a budget is exceeded. This is distinct from request rate limiting — spend limits enforce monetary caps rather than request counts.

Key Points

  • Tracks actual cost using token usage and known model pricing; blocks requests when budget is exceeded.
  • Scope limits by model, provider, or custom metadata (e.g., per-user, per-team, per-model).
  • Configurable time windows: fixed or sliding enforcement intervals.
  • Examples: $200/day per user, $10,000/day gateway cap, or $50/day per user for a specific model.
  • Works with Unified Billing and BYOK requests for models with known pricing.
  • Use cases: per-user budgets, global spend caps, per-model cost controls to prevent unexpected charges.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

AI Gateway — Spend limits(支出上限)でAIコストを管理

AI Gateway — Spend limits(支出上限)でAIコストを管理

公開日: 2026-06-05

AI Gateway は現在、Spend limits をサポートしています。Spend limits は累積ドル支出を追跡し、予算を超えた場合にリクエストをブロックするコストベースの予算機能です。

レート制限がリクエスト数を上限するのに対し、Spend limits はトークン使用量とモデルの価格に基づいて実際のコストを追跡します。モデル、プロバイダ、カスタムメタデータの次元で制限をスコープできます。例えば:

  • 各ユーザーに $200/日 の予算を付与する
  • ゲートウェイ全体の合計支出を $10,000/日 に上限する
  • 特定のモデルをユーザーごとに $50/日 に制限する

各ルールは固定またはスライディングの適用を持つ、構成可能な時間ウィンドウを使用します。

Spend limits は、既知の価格があるモデルに対して、Unified Billing と BYOK リクエストの両方で動作します。

詳細は Spend limits ドキュメントを参照してください。

リソース

  • Resources
  • API
  • Cloudflare を初めてご利用ですか?
  • Directory
  • Sponsorships
  • Open Source
  • Cloudflare Research
  • Support
  • Help Center
  • System Status
  • Compliance
  • GDPR

会社・ツール

  • cloudflare.com
  • Our team
  • Careers
  • Tools
    • Cloudflare Radar
    • Cloudflare Labs
    • Speed Test
    • Is BGP Safe Yet?
    • Certificate Transparency

コミュニティ

  • Community forum
  • X
  • Discord
  • YouTube
  • GitHub

© 2026 Cloudflare, Inc. プライバシーポリシー | 利用規約 | セキュリティ問題の報告 | 商標 | Cookie 設定

この情報は役に立ちましたか? はい / いいえ

AI Gateway - Control AI costs with spend limits | Cloudflare Developer Platform | DocsDigest