NotCheapMAKE EVERY CREDIT COUNT

OpenRouter vs Portkey vs Cloudflare AI Gateway: Real LLM Gateway Cost per 1 Billion Tokens in 2026

Prices checked: October 2, 2026.

DIRECT ANSWER

Short answer

On a billion tokens a month, the gateway layer usually costs less than a rounding error on your model bill, as long as you pick the right billing mode:

  • Cloudflare AI Gateway is the cheapest gateway layer: $0 to about $5 a month for 1 billion tokens if you pay providers directly. Analytics, caching and rate limiting are free, and logs fit inside the $5 Workers Paid plan at this volume.
  • Portkey Production costs about $130 a month at 1 million requests (roughly 1B tokens at 1,000 tokens per request). Portkey bills by recorded request or log, not by tokens, so heavier prompts cost less per token.
  • OpenRouter is the most expensive if you buy credits, because the fee is 5.5% of everything you spend: $275 on a $5,000 model bill and $1,650 on a $30,000 bill. With your own provider keys (BYOK), the first $25,000 of list-price inference each month carries no fee, so most 1B-token workloads pay $0.

Pricing models differ completely. OpenRouter and Cloudflare's Unified Billing charge a percentage of spend, Portkey charges per logged request, and Cloudflare's base gateway charges per stored log. "Cost per token" depends on which of those your setup triggers.

Native billing units

GatewayWhat you are billed onRateLabel
OpenRouter (credits, card)Credit purchases5.5% fee, $0.80 minimumOFFICIAL
OpenRouter (credits, crypto)Credit purchases5%OFFICIAL
OpenRouter Business planCredit purchases8% feeOFFICIAL
OpenRouter BYOK (Standard/Business)List-price inference routed with your own keys$0 up to $25,000/month, then 5%OFFICIAL
OpenRouter model pricesTokensPassed through from providers with no markupOFFICIAL
Portkey DeveloperRecorded logsFree, 10,000 logs/month, 3-day log retentionOFFICIAL
Portkey ProductionRecorded logs/requests$49/month incl. 100,000; +$9 per extra 100,000; self-serve overage up to 3M requests/monthOFFICIAL
Portkey EnterpriseCustomCustom (10M+ logs/month)QUOTE-ONLY
Cloudflare AI Gateway coreAnalytics, caching, rate limitingFreeOFFICIAL
Cloudflare logs (new gateways)Log events via Workers LogsWorkers Paid ($5/month): 20M events included, then $0.60 per millionOFFICIAL
Cloudflare logs (gateways created before Sept 24, 2026)Stored logsPaid: 10M logs per gateway; Free: 100,000 totalOFFICIAL
Cloudflare Unified BillingCredits purchased5% fee; provider rates passed throughOFFICIAL
Cloudflare LogpushPushed log requests10M/month included on Workers Paid, then $0.05 per millionOFFICIAL

What 1 billion tokens looks like in each billing unit

A billion tokens isn't one fixed workload. Two variables change the gateway bill:

  1. Tokens per request. It sets your request count, which drives Portkey and Cloudflare logs.
  2. Your model spend. It drives OpenRouter credits and Cloudflare Unified Billing.

Illustrative scenarios (ILLUSTRATIVE):

  • Tokens per request: 1,000 (1M requests), 500 (2M requests) or 2,000 (500,000 requests)
  • Model spend for 1B tokens: $1,000 (budget model, ~$1/M blended), $5,000 (mid-tier, ~$5/M blended), $30,000 (frontier model, ~$30/M blended)

These model prices are scenario inputs, not quotes for any specific model.

Gateway fee per 1 billion tokens

By model spend (percentage-based gateways)

Model spend for 1B tokensOpenRouter credits (5.5%)OpenRouter BYOKCloudflare Unified Billing (5%)
$1,000$55$0$50
$5,000$275$0$250
$30,000$1,650$250 (5% of the $5,000 above $25,000)$1,500

By request count (request- or log-based gateways)

Requests for 1B tokensPortkey ProductionCloudflare AI Gateway (direct provider billing, new gateway)
500,000 (2,000 tokens/request)$85$5 (Workers Paid; logs well under 20M)
1,000,000 (1,000 tokens/request)$130$5
2,000,000 (500 tokens/request)$220$5

Portkey math: $49 base covers 100,000 requests, and each further 100,000 adds $9. For example, 1,000,000 requests = $49 + 9 × $9 = $130. Production's self-serve overage stops at 3M requests a month ($49 + 29 × $9 = $310). Above that, Portkey is Enterprise (QUOTE-ONLY).

Cloudflare math: the gateway itself is free. Logs only start costing extra past 20 million events a month, which is about 20 billion tokens at 1,000 tokens per request. With logging off, the gateway layer costs $0.

The real total: model bill plus gateway

All three pass provider token prices through without markup, so the model bill is the same everywhere. Only the gateway layer differs. In the mid-tier scenario ($5,000 model spend, 1M requests):

SetupModel billGateway layerTotal
Cloudflare AI Gateway, direct provider keys$5,000~$5~$5,005
OpenRouter BYOK$5,000$0$5,000
Portkey Production, direct provider keys$5,000$130$5,130
Cloudflare Unified Billing$5,000$250$5,250
OpenRouter credits (card)$5,000$275$5,275

Gateway overhead as a share of the model bill: 0–0.1% (Cloudflare direct or OpenRouter BYOK), 2.6% (Portkey at 1M requests), 5–5.5% (credit-based billing).

Where the cost catches you

  • OpenRouter's fee scales with your model choice, not your traffic. Switching from a budget model to a frontier model multiplies the fee, even if the token count stays the same.
  • The BYOK allowance is a monthly list-price cap. Above $25,000 of list-price inference a month on Standard or Business, 5% applies to the excess. Enterprise accounts get $200,000 before the fee.
  • OpenRouter Business charges 8% on credits, more than Standard's 5.5%. Business features cost more per dollar you route through credits.
  • Portkey penalizes chatty traffic. Many short requests (agents, tool calls, classification) inflate the request count. At 200 tokens per request, 1B tokens is 5 million requests. That's above the Production plan's 3M-request self-serve ceiling (where Production tops out at $310/month), so it requires Enterprise pricing (QUOTE-ONLY).
  • Portkey Developer doesn't block traffic past 10,000 logs. Requests keep flowing, but extra logs aren't recorded, so you lose observability rather than uptime.
  • Cloudflare changed log billing for new gateways. Gateways created on or after September 24, 2026 use Workers Logs pricing. Older gateways keep the 10M-logs-per-gateway limit. Check which rules your account falls under.
  • Cloudflare's Unified Billing costs about the same as OpenRouter credits. The 5% fee only buys you one invoice. With your own provider keys, the fee disappears.

Which one fits

  • Cheapest gateway layer at any scale: Cloudflare AI Gateway with direct provider keys.
  • Many models, one key, still no fee: OpenRouter BYOK, as long as you stay under $25,000 of list-price inference a month.
  • Deep observability, prompt management and guardrails as a product: Portkey. It costs most per request, but its price doesn't move with your model choice.
  • Avoid unless the single invoice matters: credit-based billing on OpenRouter or Cloudflare, which costs 5–5.5% of everything you spend.

Assumptions

  • 1 billion total tokens (input + output) per month
  • Request counts derived from 500 / 1,000 / 2,000 tokens per request
  • Model spend figures are illustrative blended rates, not quotes for a specific model
  • Cloudflare figures assume Workers Paid ($5/month) on a gateway created after September 24, 2026
  • Excludes enterprise discounts and taxes

Pricing sources