OpenRouter vs Portkey vs Cloudflare AI Gateway: Real LLM Gateway Cost per 1 Billion Tokens in 2026
The bottom line: Cloudflare's core gateway and OpenRouter's Bring Your Own Key (BYOK) add literally $0 in gateway markup to a modest model bill, while platforms like Portkey and Helicone bundle observability, logging, and evaluation into their pricing. When you build production AI agents or multi-model architectures, an AI gateway is your first line of defense against vendor outages, provider rate limits, and latency spikes. But comparing costs takes more than reading a pricing page. The formula that matters in production is model inference + gateway platform fees + log storage + credit purchase fees. A free routing gateway doesn't make upstream tokens free, and a $79 or $799 monthly SaaS tier doesn't guarantee you won't get hit with metered overages.
My practical rule of thumb: pay for a gateway layer only when you'll actually use what it adds, whether that's logs, guardrails, or a single invoice. If you just need routing and failover, the free options go a long way.
Prices were checked on 25 October 2026, in USD before tax. The examples below use clearly stated workload parameters, so you can swap in your own input/output token ratios and request volumes.
Four products, several billing modes
| Service | Published billing basis | What to budget separately |
|---|---|---|
| OpenRouter Standard credits | 5.5% fee when buying credits; provider list token rates pass through | Model consumption; unused prepaid credit; any additional services |
| OpenRouter Business credits | 8% credit purchase fee | Same separation between deposits and token usage |
| OpenRouter BYOK | $25,000 monthly list-price inference allowance; 5% fee on excess, paid from credits | Provider invoice plus purchase fee if funding those gateway credits |
| Portkey Production | $49/month includes 100,000 recorded logs; $9 per additional 100,000, up to 3 million | Provider inference and any separately charged services; Enterprise quote above the published range |
| Cloudflare AI Gateway | Core routing, caching and rate limiting free | Provider inference, selected logging plan and any Worker application usage |
| Cloudflare Unified Billing | 5% fee on purchased model credits | Logs and other platform services |
| Helicone Pro / Team | $79 / $799 monthly base; both show 10,000 free requests plus usage-based charges | Request overages and storage; provider inference or gateway credits |
Sources: OpenRouter pricing, OpenRouter BYOK rules, Portkey pricing and plan limits, Cloudflare gateway pricing, Unified Billing and Helicone pricing.
One detail to keep in mind with Helicone: the Team plan does not list ten million included requests. Its comparison table lists 10,000 free requests plus usage pricing, alongside a storage allowance and retention settings. Run Helicone's pricing calculator with your expected JSON payload sizes and compliance retention requirements before treating $799 as a fixed monthly ceiling. (Helicone is no longer affiliated with Mintlify; the platform continues active, independent development).
Translate requests into tokens
A common trap in architecture planning is confusing total requests with total tokens. Say you make one million API calls with 1,000 input tokens and 250 output tokens each. That generates 1 billion input tokens + 250 million output tokens = 1.25 billion total tokens, which is quite different from a flat one-billion-token total.
Model bill = input tokens ÷ 1,000,000 × input rate + output tokens ÷ 1,000,000 × output rate. With our standard reference benchmark of $2 per million input tokens and $8 per million output tokens, the base provider model bill comes out to $4,000. Extras like vision tokens, tool schemas, and cache writes bill separately.
Gateway pricing models react very differently to request granularity. One billion total tokens can arrive as 500,000 long-context requests averaging 2,000 tokens, one million calls averaging 1,000 tokens, or two million short calls averaging 500 tokens. On Portkey's published rates, those three traffic distributions generate log-volume fees of $85, $130 and $220 respectively ($49 base plus $9 per 100k overage). Token count alone never tells the whole financial story.
Worked budget: one million recorded calls
Assume one million recorded gateway calls, one model call each, our 1.25-billion-token baseline, zero cache hits, and $4,000 in raw provider inference spend. For credit-funded setups, we assume credits are bought exactly to match consumption, with no idle balances. For Cloudflare Paid, we model one log event per request within standard allowances.
| Billing choice | Gateway / billing layer | Combined modeled cost |
|---|---|---|
| OpenRouter BYOK | $0; within $25,000 allowance | $4,000 |
| Cloudflare direct provider keys, core gateway | $0; free logging can fit a sufficiently even daily schedule | $4,000, subject to daily log limits |
| Cloudflare direct keys with Workers Paid | $5 monthly minimum; one million events within allowance | $4,005 |
| Portkey Production | $49 + 9 × $9 = $130 | $4,130 |
| Cloudflare Unified Billing plus Workers Paid | $4,000 × 5% + $5 = $205 | $4,205 |
| OpenRouter Standard credits | $4,000 × 5.5% = $220 | $4,220 |
| Helicone Pro | $79 base plus measured request and storage charges | $4,079 plus usage, not a fixed quote |
If you go with OpenRouter Business credits, the purchase fee is 8% ($320 fee), bringing total spend to $4,320. Token consumption itself carries zero markup. Similarly, Cloudflare's Unified Billing charges a 5% deposit fee, so funding $100 in model credits costs $105. Real-world top-ups are discrete payments, so unspent balances carry over to subsequent billing cycles.
If you're on Portkey, remember that "recorded requests" does not equal "human user queries." An autonomous agent running tool-calling loops can easily trigger 5 to 15 gateway calls for a single user prompt. Keep an eye on your agent traces to see how fallbacks, retries, and evaluations turn into billable log records. It's the kind of thing you only notice when the invoice arrives.
Worked budget: ten million calls
Now scale that same workload 10x: 10 billion input + 2.5 billion output tokens, creating a $40,000 raw model invoice.
| Billing choice | Additional cost | Combined modeled cost |
|---|---|---|
| OpenRouter BYOK | ($40,000 − $25,000) × 5% = $750 gateway fee; $41.25 Standard purchase fee to fund $750 of gateway credits | $40,791.25 |
| Cloudflare direct keys with Workers Paid | $5, assuming ten million log events and no other allowance usage | $40,005 |
| OpenRouter Standard credits | $40,000 × 5.5% = $2,200 | $42,200 |
| Cloudflare Unified Billing plus Workers Paid | $40,000 × 5% + $5 = $2,005 | $42,005 |
| Portkey | Enterprise quote required beyond the published Production range | $40,000 plus the quote |
| Helicone | Selected base subscription plus request and storage usage | $40,000 plus the measured observability cost |
A word of caution on spreadsheet projections: Portkey's self-serve tier caps out at 3 million recorded requests ($49 + 29 × $9 = $310). Scaling to 10 million requests means a custom Enterprise contract.
With OpenRouter BYOK, the $25,000 threshold tracks public list-price token value. If you negotiated custom enterprise volume discounts directly with OpenAI or Anthropic, OpenRouter still meters against standard public rates. Funding the $750 fee via standard credit purchase adds a 5.5% purchase fee ($41.25), landing your total at $40,791.25.
Cloudflare logs: a daily limit is not a monthly allowance
Gateways created on or after 24 September 2026 integrate directly with Workers Logs (older accounts operate under Legacy Logs rules). Under active Workers Logs rules, the Free tier provides 200,000 events per day with three-day retention. The Workers Paid plan ($5/month base) bumps that to 20 million events per month, with additional events billed at $0.60 per million and seven-day retention.
A steady stream of one million requests per month averages roughly 33,333 events per day and fits comfortably within the Free allowance. But a sudden one-day marketing spike pushing one million events will blow past the daily cap. Complex gateway configurations can also emit multiple log records per request. On Workers Paid, scaling to 30 million events adds $6 over the allowance, totaling $11 including the $5 base. (Cloudflare has scheduled logging pricing updates beginning 1 December 2026; keep that date in mind for long-term contract modeling).
Retries and agents: count the billable work
In a straightforward app, one user interaction produces one LLM call. Production resilience, though, demands fallbacks and guardrails. A realistic multi-step agent flow, say 0.8 primary model executions, 0.24 fallback attempts due to rate limits or timeouts, and one secondary evaluation call, generates 2.04 million upstream calls for every million user interactions.
Network errors that fail before model invocation are generally non-billable on OpenRouter, though completed execution stages still cost money. Successful automated retries, separate guardrail models, and repeated reasoning loops all consume tokens. In real-world production, the safest habit is to watch your total billable request count rather than assuming retries are free.
When does caching pay for the gateway?
Semantic and exact response caching can cut upstream provider bills noticeably by serving identical queries straight from the edge. But caching only makes financial sense if net savings exceed the cost of the gateway layer.
On our $4,000 baseline model spend, paying $130 for a dedicated gateway requires at least a 3.25% reduction in upstream token costs just to break even ($130 ÷ $4,000). If edge caching eliminates 10% of your requests ($400 gross savings), your net monthly savings work out to $270 ($400 − $130).
Our decision
If your main goal is solid provider routing, failover fallbacks, and keeping your direct cloud provider discounts, Cloudflare AI Gateway (direct keys) or OpenRouter BYOK are hard to beat as $0-overhead starting points. If your team needs deep observability, custom prompt guardrails, and compliance tracing, Portkey's structured logging delivers strong value, and the self-serve pricing is easy to model up to 3 million recorded requests.
Unified billing credits are well worth the 5% to 5.5% surcharge when they save you from juggling corporate cards across a dozen AI providers. If that's not your pain point, save the budget. For browser-based AI agents, you can pair these gateway budgets with our dedicated cloud browser cost guide.