Guide · Gateway comparison

LiteLLM vs OpenRouter: which LLM gateway fits your stack?

LiteLLM is a self-hosted gateway you operate; OpenRouter is a hosted model marketplace. The real choice is who owns the routing layer, infrastructure and security boundary. OpenLux offers a third path: a hosted, curated catalogue with published rates and request-level usage.

LiteLLMOpenRouterSelf-hostedManaged gateway

Reviewed by OpenLux Engineering Team · Last verified

Create an API key Read the docs

Abstract orange glass sculpture illustrating LiteLLM vs OpenRouter on OpenLux
LiteLLM vs OpenRouter + OpenLux — one key, one endpoint, one bill.

LiteLLM vs OpenRouter at a glance

This table compares the operating model first. Model breadth and a headline price matter less if the ownership and security requirements do not fit.

DecisionLiteLLMOpenRouterOpenLux
Who runs the gatewayYour team deploys LiteLLM Proxy and owns upgrades, availability and incident responseOpenRouter operates a hosted marketplace and routing serviceOpenLux operates a hosted OpenAI-compatible gateway
Model coverageWhatever your team configures and maintainsLarge marketplace with broad model and provider discoveryCurated catalogue across text, image, audio, video and retrieval
Routing and policyHighly configurable inside your own infrastructureHosted routing, provider selection and marketplace controlsManaged multi-region access with automatic retries; advanced policy should be verified
Security boundaryYou own the control plane, provider credentials, logs and network boundaryDepends on the hosted platform, provider routing and contractHosted service with scoped keys, request logs and published policies
Direct costOpen-source software plus infrastructure, engineering and on-call costProvider usage plus the marketplace's current fee modelPublished USD catalogue rate with pay-as-you-go metering
Best fitPlatform teams that need deep customisation or a self-hosted boundaryTeams that prioritise marketplace breadth and discoveryTeams that want a simpler managed endpoint and auditable model rates

How we evaluated this

We compared LiteLLM, OpenRouter and OpenLux from their public documentation and pricing pages on 3 November 2026. The comparison focuses on decisions that remain after a demo: who operates the gateway, where credentials and logs live, how model changes are governed and what the team must maintain.

OpenLux is one of the options on this page. We do not claim hands-on testing of every LiteLLM or OpenRouter deployment. Features, model availability and fees change, so verify the current documentation and contract for your required workload.

What should you compare before choosing LiteLLM or OpenRouter?

Use the same scorecard for both options, then add managed alternatives such as OpenLux if reducing internal operations is a goal.

  • Who deploys, upgrades, monitors and supports the gateway at 2 a.m.?
  • Which models and modalities are required today, and how are new models approved?
  • Where do provider keys, prompts, request logs and usage records live?
  • Can routing fallbacks change the model or provider without clear evidence?
  • What are the infrastructure, engineering, on-call and egress costs of self-hosting?
  • Which billing currency, invoice type, taxes and minimum commitment apply?
  • How do request IDs, usage records and errors support cost reconciliation?
  • What is the tested path back to direct provider APIs or another gateway?

What is the main difference between LiteLLM and OpenRouter?

LiteLLM is primarily software that your team runs as a gateway or proxy inside its own environment. OpenRouter is a hosted marketplace and routing service built around a broad model catalogue. The former trades operational freedom for operational responsibility; the latter removes infrastructure work but adds a hosted commercial dependency.

That distinction changes the security review, incident owner, observability stack and cost model. A token-price comparison alone cannot explain whether one request crossed your network boundary, who can read its logs or which team is paged when routing fails.

Does free LiteLLM software make self-hosting cheaper?

Not automatically. A production LiteLLM deployment still needs compute, networking, secrets management, monitoring, upgrades, backups, testing and an owner for provider incidents. The engineering time can exceed the visible infrastructure bill, especially when the gateway serves multiple teams.

Build a worked total-cost model: platform engineering hours, on-call, observability, security review and spare capacity. Free software is a licensing model, not a zero-cost operating model.

Where does OpenRouter reduce operational work?

OpenRouter supplies the hosted account, model catalogue and routing surface, so the application team can start with an API key instead of deploying a gateway. Teams often choose it when model breadth, discovery and a familiar hosted marketplace matter more than controlling the proxy internals.

The trade-off is that pricing, provider routing, data handling and regional availability depend on the hosted platform. Verify current fees, contract terms, model-specific constraints and the evidence available for production incidents.

How should routing and fallback behaviour be tested?

Use stable test prompts, expected tool-call shapes and provider metadata to confirm which model answered. Test a provider timeout, an invalid model, a rate-limit response and a cancelled stream. Capture the behaviour rather than relying on a routing diagram.

For LiteLLM, your team can inspect and customise the policy directly, but it also owns every failure mode. For a hosted gateway, ask what is configurable, what fallback is automatic and what information appears in logs. In both cases, make model substitution visible to the application.

When is a managed gateway such as OpenLux the better fit?

A managed gateway is a better fit when the team wants one OpenAI-compatible endpoint, published model prices and request-level usage without running the routing control plane. OpenLux combines a compact catalogue with USD metering and console logs, which is enough for teams that do not need a self-hosted proxy or a marketplace with hundreds of models.

Choose LiteLLM when deep customisation or an internal security boundary is mandatory. Choose OpenRouter when catalogue breadth is the primary buying criterion. Treat each as an operating-model decision and trial one representative workload before migrating the default.

Keep model names in configuration

Whichever gateway you choose, a stable model mapping makes comparison and rollback possible.

OpenAI-compatible client

from openai import OpenAI

client = OpenAI(
    base_url="https://openlux.lol/v1",  # gateway-specific
    api_key="sk-openlux-...",           # gateway-specific
)

response = client.chat.completions.create(
    model="gpt-6-astra",                # OpenLux catalogue ID
    messages=[{"role": "user", "content": "Summarise this incident."}],
)

Models to use in a gateway pilot

ModelVendorPriceVs. official
gpt-6-astraOpenAI$0.3677 / 1M tokens-96%
claude-sonnet-4-5-20250929Anthropic$0.2647 / 1M tokens-91%
gemini-3.8-flashGoogle$0.0551 / 1M tokens-92%
deepseek-v4DeepSeek$0.0613 / 1M tokens-90%

Prices are metered in USD; the full list lives in the model catalogue.

Key takeaways

  • LiteLLM is self-operated software; OpenRouter is a hosted marketplace.
  • Self-hosting shifts cost from a gateway fee to infrastructure, engineering and on-call work.
  • Test routing, fallback, logging and security boundaries for the exact production workload.
  • OpenLux is the managed option when a compact catalogue and published rates are sufficient.

Frequently asked questions

Is LiteLLM cheaper than OpenRouter?

LiteLLM software itself is open source, but a production deployment includes compute, engineering, monitoring and on-call cost. Compare total cost of ownership, including the current OpenRouter marketplace fee and the price of the underlying models.

Can LiteLLM and OpenRouter be used together?

They can coexist. A team may use LiteLLM for internal policy or local models while keeping a hosted marketplace for selected workloads. Keep model names, logs and budget ownership explicit so traffic does not become untraceable.

Which option has a larger model catalogue?

OpenRouter is designed around broad model and provider discovery. LiteLLM can expose whatever your team configures, but your team owns provider access, configuration and maintenance. Verify current model availability rather than comparing catalogue counts alone.

Where does OpenLux differ from both?

OpenLux is hosted rather than self-hosted, but it uses a curated catalogue rather than trying to be the largest marketplace. It publishes model rates, exposes an OpenAI-compatible endpoint and records request usage in USD.

How should a team decide?

Start with ownership, security boundary, required models and total monthly cost. Run the same workload through each shortlisted option and compare quality, latency, retry rate, request traceability and the work required to operate it.

Sources and official documentation

Evaluate a hosted gateway with your own workload

Test OpenLux against the same prompts, tools, latency and cost criteria you use for LiteLLM and OpenRouter.

Create an API key See pricing

LiteLLM vs OpenRouter: Self-Hosted or Managed? (2026) | OpenLux