DEV Community

Cover image for When Is a Managed LLM Gateway Worth Its Cost?
Eric Thompson
Eric Thompson

Posted on

When Is a Managed LLM Gateway Worth Its Cost?

A managed LLM gateway is worth its cost in two situations: almost always when it is priced per log or per seat, and only below a spend threshold when it takes a percentage of your model spend.
Log-priced gateways are cheap relative to engineering time. Portkey's Production plan, for example, works out to about $130 a month at one million logged requests. That is less than two hours of a fully loaded US engineer.
Percentage-fee gateways scale with your bill. At a 5.5% platform fee, a managed gateway costs more than self-hosting once your monthly model spend passes roughly $35,000 if self-hosting would take 20 hours a month of US engineering time, or roughly $13,000 if that work is done at offshore rates (illustrative; infrastructure excluded).
Above those lines, self-hosting an open-source gateway, using your own provider keys, or negotiating an enterprise contract usually costs less. The rest of this article shows the numbers, so you can rerun them with your own.

Disclosure, scope and freshness

Affiliation: Published by CodingCops, which builds AI systems and supplies engineering teams. [Editor to confirm before publishing: CodingCops has no reseller or paid relationship with any gateway named here.]
Scope: US dollars; US-based buyer; vendor prices as listed on each vendor's pricing page on October 27, 2026; US engineering cost from BLS May 2025 wages and June 2026 benefit data. Gateway pricing changes often, so this guide is reviewed quarterly.
Labels: Sourced figures come from the cited page. Illustrative figures are this article's calculations, with assumptions stated. Model token prices are excluded throughout: they are the same whichever gateway you use, unless a gateway marks them up.

What an LLM gateway does, and three ways to get one

An LLM gateway is a proxy between your application and model providers. It gives you one API across providers, plus the controls you would otherwise build yourself: key management, retries and fallbacks, routing and load balancing, caching, rate limits and budgets, request logging, cost attribution, and guardrails.

You can get one in three ways:

  1. Managed SaaS. The vendor runs it. You pay a subscription, a per-log fee, or a percentage of model spend.
  2. Self-hosted open source. You run a free gateway (LiteLLM and Portkey both publish open-source versions) on your own infrastructure. No licence fee; you pay in infrastructure and engineering time.
  3. Enterprise licence. A vendor's enterprise edition, often deployable in your own cloud or VPC, with SSO, audit logs and support. Priced by quote. The cost question is really a question about which bill grows fastest as you scale: a vendor fee, your cloud bill, or your engineers' time. Managed gateway pricing in 2026: the two pricing families Managed gateways price in one of two ways, and which one you face matters more than the headline number: a percentage of model spend, which grows with your bill, or a fee per log, seat or plan, which grows with request volume and usually stays small.

Percentage-of-spend pricing (sourced)

• OpenRouter: 5.5% platform fee on the Standard pay-as-you-go plan and 8% on Business; enterprise fee discounts by negotiation. With your own provider keys (BYOK), the first $25,000 of list-price inference a month carries no fee, then 5% (OpenRouter pricing).
• Cloudflare AI Gateway, Unified Billing: a 5% fee on credit purchases, with provider inference passed through at the provider's per-token rate. Using your own provider keys avoids this fee; core gateway features (analytics, caching, rate limiting) are free (Cloudflare AI Gateway pricing).

Plan and log-based pricing (sourced)

• Portkey: Developer plan free (10,000 recorded logs a month; the vendor says it is not suitable for production). Production plan $49 a month with 100,000 logs, then $9 per additional 100,000. Enterprise by quote, with SSO, VPC hosting and compliance options (Portkey pricing).
• Helicone: Hobby free (10,000 requests, 7-day retention); Pro $79 a month; Team $799 a month; Enterprise custom. Usage-based charges apply beyond included volumes, but per-unit rates are not published on the pricing page (Helicone pricing).
• Cloudflare logs: older gateways include 100,000 stored logs on Workers Free and 10 million per gateway on Workers Paid; gateways created on or after September 24, 2026 follow Workers Logs pricing.

Self-hosted and enterprise licences (sourced)

• LiteLLM: open-source edition free with no licence fee, including virtual keys, budgets, rate limits, fallbacks and logging. Enterprise is an annual custom quote based on request capacity, deployment architecture and support, and the vendor states it is never priced per token. SSO, audit logs, RBAC and air-gapped deployment are enterprise-only (LiteLLM pricing).
Two things to check on any plan: whether hitting a log limit stops logging or stops traffic (Portkey says requests keep flowing), and whether the features you need, usually SSO, audit logs and data residency, sit only in the enterprise tier.

What self-hosting really costs

The licence for an open-source gateway is free; the real cost is the engineer who keeps it running, and that cost depends heavily on where that engineer sits.

Engineering rates used (sourced inputs)

• US in-house: $95.44 an hour fully loaded. BLS puts the median software developer wage at $135,980 (May 2025); wages were 68.5% of total employer cost for full-time private-industry workers in June 2026, so $135,980 ÷ 2,080 hours ÷ 0.685 (BLS OOH, BLS ECEC).
• Nearshore (Latin America): $67.50 an hour, the midpoint of the $60–$75 senior band in Accelerance's 2026 survey (via BEON.tech).
• Offshore (Asia): $36 an hour, the midpoint of the $31–$41 senior band in the same survey.

Where the hours go

• Setup: deployment, secrets management, provider configuration, high availability, log storage, dashboards, access control.
• Upkeep: version upgrades, new providers and models, incident response, cost-map updates when provider prices change, log retention, security patching.
• Compliance work: audit evidence, access reviews, data-residency controls; heavier in regulated industries.
This article assumes 20 hours a month of upkeep for one production gateway and 80 hours a month (half an engineer) for an enterprise deployment. These are illustrative; replace them with your own estimate.

Monthly upkeep cost (illustrative)

• 20 hours a month: US $1,909 · nearshore $1,350 · offshore $720
• 80 hours a month: US $7,635 · nearshore $5,400 · offshore $2,880
Infrastructure (compute, database, log storage, network) comes on top. It is left as a variable here because it depends on your cloud, region, redundancy and log volume; price it from your own cloud bill.

The break-even model

A percentage-fee gateway is cheaper than self-hosting only while its fee is below what self-hosting would cost you each month:
f \times S < I + H \times r
where f is the gateway fee rate, S is monthly model spend through the gateway, I is monthly self-hosting infrastructure, H is monthly upkeep hours and r is the loaded hourly rate. Solving for the spend at which the two are equal:
S^{*} = \frac{I + H \times r}{f}
Break-even monthly spend at 20 upkeep hours, infrastructure excluded (illustrative)
• 5.5% fee (OpenRouter Standard): US engineer $34,705 · nearshore $24,545 · offshore $13,091
• 5% fee (Cloudflare Unified Billing; OpenRouter BYOK above its free allowance): US $38,176 · nearshore $27,000 · offshore $14,400
Example: with a US engineer, $1,909 ÷ 0.055 = $34,705. Adding infrastructure raises every threshold. Each $500 a month of infrastructure moves the 5.5% break-even up by about $9,100 of spend.

Two adjustments specific to vendors:

• OpenRouter BYOK charges nothing on the first $25,000 a month of list-price inference, so its fee is (S − 25,000) × 5%. Below $25,000 a month, the fee is zero and self-hosting cannot win on fees alone.
• Log-priced gateways don't fit the formula because their cost doesn't track spend. Portkey Production is $49 + $9 per extra 100,000 logs: about $130 a month at 1 million logs and $310 at 3 million. Against a 20-hour upkeep budget, self-hosting does not beat that on cost at any of the three engineering rates.

Budget scenarios: pilot, production, enterprise

The right gateway changes as an AI product moves from pilot to production: managed is the clear winner in a pilot, log-priced managed or BYOK wins in production, and at enterprise scale the real choice is an enterprise quote versus your own team. All figures are monthly and illustrative; model token costs excluded.

Scenario 1 — Pilot: $2,000 model spend, 50,000 requests

• OpenRouter with credits (5.5%): $110
• OpenRouter BYOK: $0 (under the $25,000 free allowance)
• Cloudflare with your own keys: $0 for core features; $100 if using Unified Billing
• Portkey Production: $49 (within 100,000 logs)
• Helicone Pro: $79 base
• Self-hosted, 20 hours upkeep: $720–$1,909 plus infrastructure
Read: Self-hosting costs roughly 7 to 40 times more than the paid managed options here. In a pilot, engineering hours belong on the product, not the plumbing.

Scenario 2 — Production: $40,000 model spend, 1 million requests

• OpenRouter with credits (5.5%): $2,200
• OpenRouter BYOK: $750 ((40,000 − 25,000) × 5%)
• Cloudflare Unified Billing (5%): $2,000; own keys: core features free
• Portkey Production: $130
• Self-hosted, 20 hours upkeep: US $1,909 · nearshore $1,350 · offshore $720, each plus infrastructure
Read: This is where percentage fees start to hurt: $2,200 a month of credits fees is more than a US engineer's upkeep time. Switching to your own keys, or to a log-priced gateway, keeps managed cheaper than self-hosting.

Scenario 3 — Enterprise: $250,000 model spend, 10 million requests, SSO, audit logs and VPC required

• OpenRouter with credits (5.5%): $13,750
• OpenRouter BYOK: $11,250
• Cloudflare Unified Billing (5%): $12,500
• Portkey or LiteLLM enterprise: custom quote (Portkey's Production plan stops at 3 million requests; SSO and VPC sit in enterprise tiers)
• Self-hosted open source, 80 hours upkeep: US $7,635 · nearshore $5,400 · offshore $2,880, each plus infrastructure, plus the cost of building whatever enterprise features the open-source edition lacks
Read: Percentage fees at this scale cost $135,000–$165,000 a year. That approaches the loaded cost of a full-time US engineer (about $198,500 a year) and exceeds a full-time nearshore senior (about $129,600 at 1,920 hours), so the decision becomes an enterprise licence quote versus self-hosting with your own (or a partner's) engineers. Compare the quote to 80 hours a month plus infrastructure plus the build cost of SSO, audit and compliance controls.

Savings claims to test before you count them

Gateways are often sold on the savings they create, not just their price. Those savings can be real, but they depend on your traffic, so measure them on your own workload before putting them in a business case.
• Caching. Exact-match caching only saves money when identical requests repeat; semantic caching widens the match but can return a stale or wrong answer. Measure your hit rate in a trial before assuming any saving.
• Model routing. Sending simple requests to cheaper models can cut spend, but the saving depends on how much of your traffic can tolerate a smaller model. Validate with your own evaluation set.
• Fallbacks and retries. These protect uptime more than they cut cost; retries can increase spend if they re-send long prompts.
• Budgets and rate limits. Their value is avoiding runaway bills from a bug or abuse. They prevent losses rather than reduce normal spend.
• Cost visibility. Per-team and per-feature attribution is often the most useful output for a CFO, and it is available in both managed and open-source gateways.
None of these savings are exclusive to managed gateways: open-source gateways offer caching, routing, budgets and fallbacks too. What you pay a managed vendor for is time and operational risk, not the features themselves.

Decision framework: managed, self-hosted or enterprise

Pick the option whose cost grows slowest at the scale you expect in 12 months, not the one that is cheapest today.

Choose a managed gateway when:

• You are in a pilot or early production and model spend is below the break-even for your engineering rate.
• The gateway is priced per log or plan, not per dollar of spend.
• You can bring your own provider keys, so fees stay low or zero.
• You have no engineer with time to own another piece of infrastructure.

Choose self-hosted open source when:

• Monthly spend is well above break-even and you are paying a percentage fee.
• Data must stay inside your own cloud, and the open-source edition covers your controls.
• You already run platform infrastructure and can absorb upkeep inside an existing team.

Choose an enterprise licence when:

• You need SSO, audit logs, RBAC, air-gapped or VPC deployment, and vendor support, and building them yourself would cost more than the quote.
• Compliance requires a vendor contract, SLAs or a BAA.

Who should run a self-hosted gateway

If you self-host, the engineering rate is the biggest variable in the break-even, so staffing matters:
• In-house US platform team: highest cost per hour but deepest context; best when the gateway sits next to other internal platform services.
• Nearshore dedicated engineers: about 30% below the US loaded rate on these benchmarks, with most of the US workday in overlap for incidents.
• Offshore dedicated engineers: the lowest rate, which lowers break-even the most, but plan for limited overlap during US-hours incidents.
CodingCops is one option for that last mile. It describes itself as an AI-native technology and engineering partner whose work spans AI integration, custom LLM applications, cloud and DevOps, and dedicated engineering teams (CodingCops company profile, G2). Evaluate any partner, CodingCops included, against the break-even numbers above.

FAQ

How much does an LLM gateway cost per month?

From $0 to a few hundred dollars for most small and mid-size workloads on log- or plan-priced gateways (for example, Portkey Production is $49 a month for 100,000 logs). Percentage-fee gateways cost 5–8% of model spend unless you bring your own keys. Enterprise editions are quoted individually.

Is a self-hosted LLM gateway free?

The licence can be; the operation is not. At 20 hours a month of upkeep, the labour alone runs about $720 (offshore) to $1,909 (US in-house) a month, before infrastructure.

At what spend should I stop paying a percentage fee?

At a 5.5% fee and 20 upkeep hours a month, roughly $13,000 of monthly model spend with offshore engineering, $25,000 with nearshore and $35,000 with US in-house, before infrastructure. Use the formula above with your own numbers.

Does a gateway mark up model prices?

Check each vendor. Cloudflare states provider inference is passed through at the provider's per-token rate and charges 5% on credits. OpenRouter charges a platform fee; its pricing page did not show its markup FAQ answer when checked, so confirm with the vendor.

Do I need a gateway for an AI pilot?

Not necessarily, but a free or low-cost managed tier gives you logging and cost tracking from day one, which makes the production budget easier to estimate.

What features usually force an enterprise plan?

SSO, audit logs, role-based access, VPC or air-gapped deployment, data-retention controls and compliance agreements. On the pricing pages reviewed, these sit in enterprise tiers.

Top comments (5)

Collapse
 
dexoryn profile image
Dexoryn •

The point that stands out is that free infrastructure can become expensive once you account for the engineering time needed to maintain it. But percentage-based gateway fees can become a problem as usage scales, too.

I think the smartest approach is to measure total cost of ownership at the expected scale, rather than choosing managed or self-hosted based on the upfront price alone.

Collapse
 
heyvaldemar profile image
Vladimir Mikhalev •

Pricing is half the comparison. The other half is what the gateway keys its quotas on, because that decides whether the cost report can name who spent the money.

In the air-gapped cluster where I run one, the gateway sits inside the boundary and every caller presents a Kubernetes service account token for the gateway's audience, checked offline against the cluster's own keys. Quotas follow the token's subject, not a header the caller sets. A daily gate also requires the agent's own request count to equal the gateway's.

If spend is attributed by a header or a shared virtual key, the report says what was spent but not who spent it. That gap belongs in the table next to the 5.5%.

Collapse
 
paul_irolla_6b5ae261d0224 profile image
Paul Irolla •

A gateway earns its fee only if it changes what goes out to the model, not just what gets logged. Per-log pricing is a cost on top; cutting the re-sent context is what moves the bill.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

The percentage-of-spend fee is the part that would sting at scale. A flat log or plan price is easier to reason about before traffic grows.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.