Blog
LiteLLM vs Portkey: the build-or-buy question, priced
This is the category's cleanest build-versus-buy decision. The software is free; the question is whether your ops time is. One number settles most cases.
LiteLLM is a free self-hosted gateway: no fees, full data locality, and roughly $1,000/month of real ops cost at two loaded engineer-hours a week. Portkey is a hosted control plane at $49/month flat with governance built in (SSO, audit logs, spend controls). Data locality forces LiteLLM; everything else, price your ops honestly first.
The honest self-hosting ledger
LiteLLM's sticker price is zero and its real price is operations: hosting, upgrades, incident response, and the engineering attention those consume. At two loaded engineer-hours a week and $120 an hour, that is about $1,000 a month, roughly twenty times Portkey's flat fee, before the first incident. The break-even is brutal in the other direction too: self-hosting beats $49 flat only if it consumes under six minutes of ops per week.
The exception that saves the math: teams already running platform infrastructure with on-call, where the marginal cost of one more service approaches zero. For them LiteLLM is close to genuinely free, and the best cost structure in the category.
What Portkey's $49 actually buys
Governance as a product: SSO, audit logs, spend controls, and a hosted layer someone else keeps up, with tokens billed direct by your providers so no markup enters the token math. Portkey also maintains an open-source gateway edition, which is the honest hedge: if you outgrow hosted or need locality later, the migration path exists inside the same ecosystem.
What it does not buy is model selection. Routing rules are still yours to write and re-write as the market moves; three flagship-tier price events in nine months says how often that is.
Every fee structure at your spend
OpenRouter 5.5% on credit top-ups; Requesty 5% token markup; Portkey $49/month flat; LiteLLM $0 licence with ops estimated at ~$1,000/month (two loaded engineer-hours a week) unless the box is ticked. Fees verified 2026-07-28. The crossover between 5.5% and $49 flat sits near $891/month.
How to choose in one pass
Data cannot leave your infrastructure: LiteLLM, and take the ops line seriously. Compliance and visibility requirements with no spare ops: Portkey. Platform team with genuine spare capacity and on-call: LiteLLM wins the long run. Bill is the problem rather than governance or locality: neither is aimed at that; the fee layers are small next to the selection layer, which is where a blended model operates, several LLMs per request, billed at cost, receipts published.
Questions, answered
Is LiteLLM production-ready?
Widely used in production, yes. The production question is not the software; it is whether your team can own upgrades, incidents, and scaling for another piece of infrastructure.
Does Portkey have a self-hosted option?
Portkey maintains an open-source gateway edition alongside the hosted control plane, which makes it a reasonable hedge if requirements might shift toward locality later.
Which is cheaper?
Portkey at $49 flat is cheaper than honest self-hosting costs for most teams (~$1,000/month at 2 loaded hours/week). LiteLLM is cheaper only when ops capacity is genuinely spare, where it approaches free.
Can I start with one and switch?
Yes; both speak the OpenAI-compatible surface, so application code barely changes. Routing configuration is the part that does not travel; budget an afternoon to re-express it.
Compare any two models
Rates verified 2026-07-28. "Measured task" = our identical dashboard-generation prompt, metered where marked ✓ and list-math otherwise. Verbosity from the Verbosity Index, Edition 1. Data: prices.json.