Cloudflare AI Gateway pricing impacts OpenAI and Anthropic management
Cloudflare AI Gateway offers centralized visibility for OpenAI and Anthropic token usage through Unified Billing with a 5% fee. The platform helps mitigate unexpected AI costs, which 78% of IT leaders experienced, by tracking request payloads and providing advanced log storage.
Managing spend through a single proxy
Cloudflare AI Gateway provides a centralized way to track spending across OpenAI and Anthropic. It provides visibility for prompts, responses, and token usage. Users manage multiple provider costs through a single wallet using Unified Billing. This method adds a 5% fee to every credit purchase. A $100 credit purchase results in a $105 charge.
The fee is 5%.
OpenAI API costs fluctuate based on model selection and context length. For example, GPT-5.6 Sol charges $8 per million input tokens for long-context workloads. Because the gateway captures full request payloads and token counts, teams can identify which specific features consume their budget. This visibility helps mitigate the risk of unexpected charges, which 78% of IT leaders experienced with AI consumption in 2026.
| Feature | Workers Free | Workers Paid |
|---|---|---|
| Log storage limit | 100,000 logs total | 10,000,000 logs per gateway |
| Included requests | 100,000 requests/day | 10,000,000 requests/month |
| Logpush availability | Not available | Available |
Performance and technical limits
Latency remains a factor. The gateway adds between 20 and 60 milliseconds to most requests. For chatbots with sub-2-second response budgets, this overhead matters. This delay is irrelevant for batch processing or background jobs.
Log storage caps impact production workflows. The Workers Free tier allows 100,000 total logs per month across all gateways. Once a user hits this limit, Cloudflare stops saving new logs. The Workers Paid plan increases this ceiling to 10,000,000 logs per gateway. Users can also use Logpush on paid plans for $0.05 per million records after the first 10 million. If an organization relies on logs for debugging or auditing, they might face sudden budget issues because Cloudflare enforces strict retention caps where logs above the limit stop saving unless the team upgrades to an Enterprise plan.
Cloudflare provides Data Loss Prevention for free on all plans. This tool scans for sensitive information using shared Cloudflare One DLP profiles. The gateway also provides Guardrails, which evaluates prompts and responses through Llama Guard on Workers AI. Using Guardrails bills as Workers AI token-based inference, meaning costs scale with the length of the prompts and responses.
The infrastructure cost for the gateway involves the Workers plan. The Workers Paid plan starts at $5 monthly. This plan includes 10 million requests and 30 million CPU-milliseconds of execution per month. If a user exceeds these, Cloudflare charges $0.30 per additional million requests and $0.02 per additional million CPU-milliseconds.
Cloudflare provides exact-match caching for free. This tool returns a cached response when the model, system prompt, and user message match a previous request. Cache hit rates for conversational AI typically fall below 5%.
The overhead is minimal.
Managing model volatility
Anthropic users can reduce costs by using prompt caching. Cache reads cost only 0.1x the base input rate. This 90% discount helps lower the cost of long shared system prompts. Users can also move non-urgent jobs to the Message Batches API for a 50% discount.
OpenAI users must manage context accumulation in multi-turn conversations. Each request resends prior turns as context, which increases token volume. Reasoning-mode models also generate internal reasoning tokens that bill at output rates.
Cloudflare AI Gateway provides fallback routing to improve resilience. Teams configure a manually ordered fallback array, and when the first provider fails, the request moves to the next entry. This array supports up to five retries with constant, linear, or exponential backoff. Vercel AI Gateway handles failures differently by automatically switching to the same model on a different provider.
Cloudflare AI Gateway suits teams already using the Cloudflare ecosystem.
Will the new model-first routing eliminate the need for manual fallback configuration?