LiteLLM vs OpenRouter can start as a $500 fee decision, but infrastructure ownership and data boundaries decide what you're really buying: the two put different teams in charge of the request path and provider credentials. A $500 model bill can make a managed gateway cheaper than a self-hosted one. At $5,000, the gateway fee can cost more than the small server running your own proxy.

The short answer: choose OpenRouter when you want a hosted API, a catalog of models, and no proxy to operate. Choose LiteLLM when your team wants to host the gateway, keep provider credentials in its own infrastructure, and control virtual keys, budgets, and routing. Put LiteLLM in front of OpenRouter when you want local access controls and spend tracking while still buying hosted model access. Prices and features below were checked October 2026.

LiteLLM vs OpenRouter: which one fits your setup?

They solve adjacent problems, but they're different purchases: OpenRouter sells managed access to models; LiteLLM is a gateway you deploy and maintain.

PickChoose it when…What you take on
OpenRouterYou want one hosted endpoint and do not want to deploy a gateway. Its Standard plan lists 500+ models and 80+ providers.Requests go through a third-party service; standard credit purchases add a 5.5% fee. OpenRouter pricing
LiteLLM OSSYou already operate services and need a gateway under your network and policies. Its free self-hosted plan lists 100+ providers, virtual keys, budgets, spend tracking, and fallbacks.You own deployment, upgrades, secrets, database, and availability. LiteLLM pricing
BothYou want LiteLLM's user/key controls in front of OpenRouter's hosted catalog.You operate LiteLLM and still send prompts through OpenRouter; this does not keep prompt data within your network.

For one provider and predictable volume, skip both until you need their routing, accounting, or access-control layer. If your main question is model-token prices rather than gateway fees, compare them in the model price catalog.

What does each option cost at $500, $5,000, and $50,000 a month?

For standard OpenRouter credit purchases, budget 5.5% on top of the credits you consume, with an $0.80 minimum. For LiteLLM OSS, license cost is $0; infrastructure is not. At the assumptions below, the credit-fee line crosses the self-hosted compute line at $800 a month.

Monthly model spendOpenRouter credits: feeTotal to fund that spendOpenRouter BYOK fee*LiteLLM OSS example infraCredit fee minus infra
$500$27.50$527.50$0$44−$16.50
$5,000$275$5,275$0$44$231
$50,000$2,750$52,750$1,250$44$2,706

The calculation assumes each spend point is also the amount of credits purchased, with the platform fee added on top. OpenRouter's pricing page lists 5.5% for Standard credit purchases and an allowance of $25,000 in list-price inference per month for Standard and Business BYOK, then 5% on usage above it; Enterprise is custom.

The credit top-up's $0.80 minimum is documented in OpenRouter's fee explanation. At these three spend points, the minimum doesn't change the calculation. The $50,000 BYOK row assumes all $50,000 is list-price inference routed through BYOK; the first $25,000 is free and the remaining $25,000 incurs $1,250.

The LiteLLM comparison is intentionally lean. I priced an AWS Lightsail Large Linux bundle at $44/month (2 vCPUs, 8 GB RAM) from AWS Lightsail's bundle table. The assumption is one small host running LiteLLM, PostgreSQL, and Redis together. It's not the vendor's high-availability deployment: LiteLLM's production guide describes multiple proxy replicas, PostgreSQL, and Redis; it requires Redis once you run more than one proxy instance. This estimate excludes engineering time, backups, managed database fees, and redundancy.

The calculation script, inputs, and output are recorded in the evidence log. The $800 crossover compares only the credit fee and example infra cost, not the labor or risk of operating LiteLLM.

*BYOK means OpenRouter routes through keys you've configured with the upstream provider. The old one-million-request allowance in an October 2025 OpenRouter announcement was replaced in August 2026 by the current spend-based allowance; use the current pricing table, not the archived request count.

Which gateway gives you the controls and boundary you need?

LiteLLM gives the operator control over the gateway and its configured provider credentials. OpenRouter removes gateway operations and offers provider-side routing and data-policy controls, but it's still an external hop. The LiteLLM gateway is one self-hosted option; for Bifrost vs LiteLLM, compare feature fit and benchmark setup rather than treating a vendor speed claim as a universal result.

Decision factorLiteLLM OSSOpenRouterBifrostPortkey
HostingSelf-host; you maintain the proxy. DocsHosted API; the documented quickstart is an API endpoint. QuickstartSelf-hosted, with private enterprise deployments. GitHub projectPortkey offers a self-hosted open-source plan and managed plans; Production is $49/month. Pricing
Providers / modelsLiteLLM lists 100+ provider integrations.Standard lists 80+ providers and 500+ models; the catalog is dynamic. PricingProject README claims 23+ providers. BifrostModel support is provider-configured; I found no comparable provider total on the current pricing page. Pricing
Who holds upstream keys?You configure provider keys in your deployment; client apps use LiteLLM virtual keys. Client setupUse OpenRouter credits or BYOK: with BYOK, requests go through OpenRouter using your provider credentials. OpenRouter BYOK updateSelf-hosted gateway; configure provider access in your deployment. BifrostProvider credentials are stored as integrations and shared with workspaces; check your deployment terms. Portkey guide
Virtual keys and budgetsVirtual keys, budgets, and rate limits are listed in OSS. Virtual keys need PostgreSQL. LiteLLM key docsOpenRouter API keys accept a USD spending limit and reset interval; workspace guardrails add per-member and per-key budgets. Key API · GuardrailsProject lists budget management; confirm entitlement and plan in current docs. Bifrost projectCurrent plan page lists virtual keys with budgeting; Enterprise adds granular budgets/rate limits. Portkey pricing
Spend logsSpend tracking by key, user, or team is in OSS. Key docsOpenRouter retains request metadata; prompt/response content logging is opt-in. ZDR guideProject README lists real-time monitoring and analytics. BifrostProduction includes 100,000 recorded logs/month and 30-day log retention; Portkey says it is not recommended for teams needing custom security controls. Pricing
Fallbacks and routingMultiple strategies, load balancing, and configurable fallbacks. Routing docsAutomatic provider fallback and provider selection; use routing rules when exact endpoint policies matter. QuickstartREADME lists automatic failover, load balancing, and semantic caching. BifrostFallbacks are included on its plans; load balancing is available on all plans. Portkey docs
Retention / ZDRSelf-hosting lets you keep the gateway inside your infrastructure; the selected upstream provider still receives prompts.Can require ZDR-eligible endpoints with provider.zdr; the prompt still goes to the selected provider. ZDR guideSelf-hosting controls the gateway hop; upstream providers still receive requests. Check the current enterprise contract for retention guarantees.Production logs are retained 30 days; Enterprise offers custom retention and private-cloud deployment. Pricing
SSO and auditSSO is free up to 5 users; larger SSO, SCIM, audit logs, and enterprise governance require a license. Enterprise price is quote-only. Enterprise docsPricing lists SSO/SAML only for Enterprise; credit plans show no SSO. PricingEnterprise deployments claim additional governance/security features; I found no public SSO/audit entitlement matrix.Logs access controls are an Enterprise feature. Portkey docs
Published gateway overheadLiteLLM's own July 2026 benchmark puts the Python proxy (the OSS gateway configured in this article) at 257.7 ms p99 added latency, and its Rust gateway, an early beta, at about 0.7 ms. Benchmark postNo comparable number in the OpenRouter pages checked.4.5 ms p99 in LiteLLM's test; Bifrost's own README reports 11 µs added per request at 5,000 RPS on a t3.xlarge.2.3 ms p99 in LiteLLM's test. Benchmark post

In a Portkey vs LiteLLM check, compare the entitlements you need as well as the deployment shape: Portkey publishes a $49 managed plan with 30-day logs, while LiteLLM's audit logs sit in Enterprise and its public price is quote-only. Portkey pricing · LiteLLM pricing

The counts use each vendor's own category and wording; “models” and “provider integrations” aren't interchangeable units. The latency figures are vendor-published and measure different things. LiteLLM ran all four gateways on one 4 vCPU / 16 GB host against a mock upstream, with “no logging callbacks, spend tracking, or persistence enabled”, in single runs without error bars (LiteLLM's benchmark post); Bifrost's figure comes from its own sustained-load test.

Neither covers the budget and logging features this table compares, so measure with your features switched on before latency decides it. OpenRouter has no comparable fixed overhead number in the pages checked. Portkey's plan-specific log retention and enterprise log access controls make it a more managed governance purchase; confirm exact terms directly before treating the table as a compliance decision.

Does the March 2026 LiteLLM PyPI compromise change the choice?

The LiteLLM supply chain attack changes what you should pin and verify when self-hosting. LiteLLM's advisory dates the affected PyPI packages to March 24, 2026; its March 27 town hall says versions 1.82.7 and 1.82.8 were live for about 40 minutes before PyPI quarantined them. LiteLLM says its official proxy Docker image wasn't affected because it pins dependencies and doesn't use those PyPI packages. If your environment installed either package, version pinning alone isn't incident response: audit the environment and rotate the secrets present on it.

LiteLLM's security advisory identifies 1.82.7 as containing a malicious proxy_server.py payload and 1.82.8 as also containing litellm_init.pth. Its town hall update says it rotated affected keys, pinned GitHub Actions, started pinning CI dependencies, added isolated release steps, moved to ephemeral publishing credentials, and signed Docker images with Cosign. Those are documented remediation steps; they don't remove your team's job to verify what it installs.

For a self-hosted deployment, make the release policy concrete:

  1. Pin the LiteLLM package version or container digest; do not deploy latest.
  2. Review the exact artifact and verify the Docker image signature before rollout. LiteLLM has signed GHCR images since v1.83.0-nightly.
  3. Keep an upgrade delay for new releases, inspect the security page and changelog, then promote through staging.
  4. If 1.82.7 or 1.82.8 ran in an environment, audit local installs, CI jobs, Docker builds, and deployment logs; inspect for litellm_init.pth, investigate the host, and rotate every secret present on it.

Choosing OpenRouter directly avoids deploying LiteLLM software, but you still need to review provider privacy, retention, and account controls against your own data boundary and threat model.

When does LiteLLM in front of OpenRouter make sense?

Use the combination when you want your applications to authenticate to one gateway and you accept OpenRouter as the model-routing provider. LiteLLM's OpenRouter provider docs use the openrouter/<provider>/<model> model form and set the upstream default to https://openrouter.ai/api/v1. The YAML layout follows LiteLLM's proxy config quickstart.

Docs-only LiteLLM OpenRouter config.yaml pattern (combine the vendor's documented config shape and OpenRouter model naming; not run here):

yaml
model_list:
  - model_name: hosted-claude
    litellm_params:
      model: openrouter/<provider>/<model>
      api_key: os.environ/OPENROUTER_API_KEY

Replace <provider>/<model> with a current slug from the OpenRouter model catalog. Set OPENROUTER_API_KEY in the LiteLLM process environment through your secret manager. Keep the application key separate: give clients LiteLLM's virtual key, not the OpenRouter credential. If you call OpenRouter directly with an OpenAI SDK instead, use the official OpenRouter quickstart base URL:

text
https://openrouter.ai/api/v1

LiteLLM's production deployment guide says PostgreSQL stores keys, teams, users, spend logs, and config; Redis is required once you run multiple proxy instances. That's the point where the hybrid has real operational cost. For a single developer testing models, use OpenRouter directly and skip another service.

Where does each option lose?

Pick OpenRouter if nobody on your team can own an on-call gateway; pick LiteLLM or Bifrost if you have an owner for patching, uptime, and the database. If prompts can't pass through a third-party router, don't put OpenRouter behind LiteLLM: the provider still receives the request. OpenRouter's standard credit fee rises with spend. LiteLLM gives you a gateway you can configure and run yourself, but its own benchmark measured the Python proxy at 257.7 ms p99 added latency with logging off, so test it on latency-sensitive paths before committing. Portkey offers an open-source self-hosted plan and paid managed plans, so check the log retention and access tier before you choose it.

Octomind is ours. Its open-source Apache-2.0 octohub proxy is a Rust OpenAI-style endpoint for 20+ providers, logs every request to SQLite, MySQL, or PostgreSQL, and ships prebuilt binaries for six targets; its documented endpoint list doesn't claim Anthropic Messages API compatibility. The hosted Octomind Hub uses https://hub.octomind.run/v1 and charges the provider price plus 5%, including cache reads and writes. Both options list fewer providers than LiteLLM or OpenRouter, so they fit teams that value a smaller self-hostable proxy or our hosted access path over catalog breadth.

Get Octomind — compare the self-hosted proxy and hosted Hub before choosing another gateway.

FAQ

Is OpenRouter vs LiteLLM mainly a price decision?

OpenRouter vs LiteLLM is partly a price decision, but the answer depends on infrastructure you already operate. LiteLLM OSS has no license fee, but it needs infrastructure and engineering time. Under the one-node $44/month assumption in this article, standard OpenRouter credit fees overtake compute at about $800 of monthly model spend; operator time can move that line substantially.

Does OpenRouter charge a fee on every model call?

OpenRouter says standard credit purchases carry a 5.5% fee with an $0.80 minimum; its fee explanation says it doesn't mark up provider token prices. BYOK has a plan-dependent free allowance, currently $25,000 of list-price inference per month on Standard and Business, then a 5% fee on excess usage.

Can LiteLLM route requests through OpenRouter?

Yes. LiteLLM documents OpenRouter as a provider, with model identifiers in the openrouter/<provider>/<model> form. Put the OpenRouter key in LiteLLM's server environment and give client applications LiteLLM virtual keys if you need gateway-side user and spend controls.

Which LiteLLM versions were affected by the March 2026 PyPI incident?

LiteLLM identified 1.82.7 and 1.82.8 as compromised PyPI releases published on March 24, 2026. Its town hall says they remained available for roughly 40 minutes before PyPI quarantined them; anyone who ran them should follow the vendor advisory's response steps and rotate potentially exposed secrets.