GPU Router
Loading models…

Fetching the model catalog.

COMPARISONS

LiteLLM vs OpenRouter: Pricing, Routing and Privacy (2026)

GPU Router team14 min read

LiteLLM vs OpenRouter comes down to who runs the gateway. LiteLLM is open-source software you host in front of your own provider keys. OpenRouter is a hosted service that sells you tokens for hundreds of models through one API key. OpenRouter says it adds no markup to token prices, and LiteLLM doesn't sell tokens at all, so you're trading your own ops time against a fee and deciding where your prompts go.

If you want a lower per-token price, we'd add a third option, GPU Router, which is our product. It's a hosted OpenAI-compatible API that sends each request to the least expensive eligible route for the exact model you name, and because it speaks Chat Completions, it also works as a provider behind LiteLLM.

We tested that pairing on the evening of October 16, 2026 (Pacific time), running LiteLLM 1.105.1's proxy against our API and keeping every receipt. We also priced seven models in our catalog and OpenRouter's models API in the same second. LiteLLM's built-in spend tracking priced our test call at about seven times what we were billed.

What is the difference between LiteLLM and OpenRouter?

LiteLLM is an open-source AI gateway you deploy yourself. Your apps call one OpenAI-format endpoint, and LiteLLM calls each provider with your own keys and contracts. OpenRouter is a hosted router: you buy credits, call its API, and it picks a provider for the model you named, so there's nothing for you to run.

LiteLLMOpenRouterGPU Router
What it isOpen-source gateway, MIT-licensed outside its enterprise directoryHosted router for many providers' modelsHosted OpenAI-compatible API
Who runs itYouOpenRouterWe do
Token pricesYour providers' ratesProvider list price, no markup on inferenceQuote from the cheapest eligible route
RoutingAcross deployments you configureAcross providers serving the model, weighted toward cheaper onesLeast expensive eligible route for the exact model
Privacy controlsGateway stays on your infrastructureNo prompt logging by default; data-collection and ZDR filterszdr: true per request; optional redaction
Pick it forKeys, budgets and logs under your controlOne key for a very large catalog, no serversLower quotes than OpenRouter on 123 of 143 shared model IDs

LiteLLM's pricing page lists "100+ providers, one OpenAI API" in its free tier, along with virtual keys, spend tracking, budgets, rate limits, fallbacks and request logging. OpenRouter's homepage claims "500+ active models on 80+ providers." In our snapshot, OpenRouter's models API listed 442 paid model IDs, and our catalog had 219 models with a priced, eligible route.

Is LiteLLM cheaper than OpenRouter?

On token price, no, at least for closed models: through LiteLLM on your own key or through OpenRouter, you pay the maker's list price. For open models it depends on the host. Beyond tokens, OpenRouter charges a fee when you buy credits, while LiteLLM's free open-source gateway runs on servers you pay for.

OpenRouter's pricing page says inference "is billed at the provider's list price on every plan," and its fee "is charged when you buy credits, 5.5% on Standard and 8% on Business, never on individual requests." Its FAQ adds a $0.80 minimum to the Standard fee. If you bring your own provider keys, the first $25,000 of list-price inference each month carries no fee, then OpenRouter charges 5%.

LiteLLM's costs show up on your cloud bill instead. The proxy is a service you run, and LiteLLM's docs say virtual keys need a Postgres database. LiteLLM Enterprise adds SSO, SCIM and support on top, priced by your annual gateway request capacity, deployment and support needs, and "never per token."

Take a month of 50 million input and 5 million output tokens on GPT-6.1 Sol, which OpenAI lists at $2 / $10 per million (standard tier, short context). Through LiteLLM on your own OpenAI key, that's $150.00 in tokens. Through OpenRouter, it's the same $150.00 in tokens.

What the same models cost on each path

With LiteLLM you pay each maker's rate, or a host's if you use one. OpenRouter lists its own per-token prices, and our column is the live quote from the cheapest eligible route.

Prices retrieved October 16, 2026 at 7:14 p.m. PDT (02:14:36 UTC on October 17): our catalog and OpenRouter's models API in the same second, maker rates from each maker's pricing page. USD per 1M tokens, input / output. Our quotes include our routing fee. Prices change.

ModelMaker's API priceOpenRouter listedGPU Router quote
GPT-6.1 Sol$2 / $10$2 / $10$0.294 / $1.47
Claude Sonnet 5.5$2 / $10$2 / $10$0.777 / $3.885
Claude Opus 5.5$4 / $20$4 / $20$1.344 / $6.72
Gemini 4 Argon$2 / $10 until Nov 30$2 / $10$0.336 / $1.68
DeepSeek V4 Pro 0813$0.66 / $1.98 off-peak, $1.32 / $3.96 peak$0.66 / $1.98$0.3465 / $1.0395
GLM 5.3$1.40 / $4.40$0.079 / $4.80$0.012443 / $0.756
gpt-oss-20b—$0.018 / $0.09$0.0735 / $0.315

A dash means the maker's pricing page lists no API price for that model.

For the closed models, OpenRouter's price matched the maker's, which fits its FAQ's claim that "you pay the same rate as you would directly with the provider." Open models are messier. OpenRouter listed GLM 5.3's input well below Z.ai's own price, while its output price ($4.80) was above Z.ai's $4.40.

DeepSeek's API doubles its rates during weekday peak hours (01:00–04:00 and 06:00–10:00 UTC), so a LiteLLM setup on a DeepSeek key pays more at those times. Google's list price for Gemini 4 Argon also doubles to $4 / $20 on December 1.

Our quotes were lower on the first six rows. At our snapshot quote, those 50 million input and 5 million output GPT-6.1 Sol tokens come to $22.05, against $150.00 at OpenAI's list price. Across all 143 paid model IDs both catalogs shared, our quote for 1M input plus 1M output was lower on 123. OpenRouter's was lower on 20, including gpt-oss-20b, the last row.

A quote isn't a bill. Quotes move with supply, and final provider receipts take precedence over token-price estimates. A quote labeled "budget estimate" is a ceiling for budgeting, so the bill can come in lower.

Our test calls to GPT-6.1 Sol, Gemini 4 Argon and DeepSeek V4 Pro 0813 billed at or below their snapshot quotes. A Claude Sonnet 5.5 call sent 23 seconds after the snapshot billed about 2.5% above its snapshot quote; the cheapest route had changed in those 23 seconds. Our pricing docs explain each price.

How do LiteLLM and OpenRouter route requests?

LiteLLM routes among the deployments you configure: by default a weighted shuffle based on the rate limits you set, or by latency, load or cost if you choose. OpenRouter routes among the providers serving the model you asked for, load balancing toward cheaper ones. GPU Router also keeps your model fixed and picks its least expensive eligible route.

LiteLLM's routing docs recommend simple-shuffle "for best performance in production." It picks a deployment by the requests-per-minute or tokens-per-minute you assign and chooses at random if you assign neither. Its cost-based strategy chooses the cheapest deployment you've listed. It can only choose among keys you already hold, so it won't find the same model sold for less elsewhere.

OpenRouter's provider selection docs say its default is to "load balance requests across providers, prioritizing price," weighting the cheaper candidates by the inverse square of price and using "the remaining providers as fallbacks." Set sort: "price" and it always tries the cheapest provider first.

We pick the least expensive eligible route for the model ID you send. If the discounted routes can't serve it, the Reference provider at list price is the last fallback for the same model. Failures before the response starts can retry; a response that has already started isn't restarted. Our routing docs cover the order, and our LLM router explainer compares this kind of routing with routers that change the model.

Which is better for privacy?

LiteLLM, if you don't want a third party in the request path, though every provider you call still receives the prompt. OpenRouter doesn't log prompts by default, but its provider filter allows providers that may store data unless you change it. For zero data retention, OpenRouter can enforce it, and GPU Router sends zdr: true requests only to ZDR routes.

LiteLLM's pricing FAQ says that because it's self-hosted, your data and keys never leave your own infrastructure. That's true of the gateway itself. What reaches each model provider, and what LiteLLM's own request logging keeps, is up to how you configure it.

OpenRouter's FAQ says "Prompt and completion are not logged by default," and it offers a 1% discount if you opt in to logging. Its data_collection provider setting defaults to allow, which includes providers that may store your data; deny or a ZDR requirement narrows the pool. Its ZDR docs say you can enforce ZDR "globally, per model group, per guardrail, or per request."

With us, zero data retention is a flag on each Chat Completions request. If no ZDR route can serve it, you get HTTP 503 privacy_route_unavailable rather than a silent fallback to Standard routing.

ZDR quotes can differ from Standard ones; GPT-6.1 Sol's was $1.575 / $7.875 in our snapshot. Optional redaction can replace or reject detected emails, payment card numbers and other listed patterns before dispatch.

Our ordinary receipts store tokens, cost, timing and outcome, not prompt or response bodies, and we don't use prompts or outputs to train models. The serving provider still receives your prompt, and on Standard routing its policies can allow logging, retention or training, so use ZDR when content must not be retained.

Running LiteLLM yourself

You deploy a Python service (or LiteLLM's Docker image), set a master key, and add Postgres if you want virtual keys. After that, keeping it running and patched is your job, and so is the database behind those keys. OpenRouter runs all of this for you, in exchange for its credit fee and a third party in your request path.

Upgrades matter more than they used to. LiteLLM's security update says the PyPI releases litellm 1.82.7 and 1.82.8 were compromised and "live on March 24, 2026 from 10:39 UTC for about 40 minutes before being quarantined by PyPI." It also says the official proxy Docker image wasn't affected, and its Docker images are signed with cosign from v1.83.0-nightly on. Pin your version and verify what you install.

How to use LiteLLM with GPU Router

Point LiteLLM at any OpenAI-compatible API by putting openai/ in front of the model name and setting api_base. For OpenRouter, LiteLLM has its own openrouter/ prefix that reads OPENROUTER_API_KEY. Here's the GPU Router setup we ran, step by step. (Our AI SDK guide covers the same endpoint from TypeScript.)

Install LiteLLM with the proxy extras and export your key from GPU Router's API keys page:

pip install 'litellm[proxy]==1.105.1'
export GPU_ROUTER_API_KEY="your-gpu-router-key"

Call GPU Router from the LiteLLM SDK

The model string is LiteLLM's openai/ prefix followed by our model ID, so openai/gpt-6.1-sol becomes openai/openai/gpt-6.1-sol.

import os

import litellm

response = litellm.completion(
    # "openai/" tells LiteLLM this is an OpenAI-compatible endpoint;
    # the rest is the GPU Router model ID.
    model="openai/openai/gpt-6.1-sol",
    api_base="https://gpurouter.io/v1",
    api_key=os.environ["GPU_ROUTER_API_KEY"],
    messages=[{"role": "user", "content": "In one sentence, what does an LLM router do?"}],
    max_tokens=64,
)

print(response.choices[0].message.content)
print("input tokens:", response.usage.prompt_tokens, "output tokens:", response.usage.completion_tokens)

It printed:

An LLM router directs each request to the most suitable language model based on factors such as task complexity, cost, speed, and required capabilities.
input tokens: 18 output tokens: 32

That's a fair description of a model router. GPU Router is the other kind, which keeps the model you asked for and picks the route.

Run the LiteLLM proxy with a standard and a ZDR alias

Save this as config.yaml. The second alias sends the same model with zdr: true on every request, so nobody calling it can forget the flag.

model_list:
  - model_name: gpt-6.1-sol
    litellm_params:
      model: openai/openai/gpt-6.1-sol
      api_base: https://gpurouter.io/v1
      api_key: os.environ/GPU_ROUTER_API_KEY
    model_info:
      input_cost_per_token: 0.000000294 # our quote when we tested; check the model page
      output_cost_per_token: 0.00000147
  - model_name: gpt-6.1-sol-zdr
    litellm_params:
      model: openai/openai/gpt-6.1-sol
      api_base: https://gpurouter.io/v1
      api_key: os.environ/GPU_ROUTER_API_KEY
      extra_body:
        zdr: true
    model_info:
      input_cost_per_token: 0.000001575 # ZDR quotes differ from Standard
      output_cost_per_token: 0.000007875

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY

Start the proxy and call it like any OpenAI endpoint:

export LITELLM_MASTER_KEY="sk-pick-a-long-random-string"
litellm --config config.yaml --port 4000
curl http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-6.1-sol", "max_tokens": 64, "messages": [{"role": "user", "content": "In one sentence, what does an LLM router do?"}]}'

Our run returned HTTP 200 with 18 input and 32 output tokens. The receipt billed $0.000048; at OpenAI's list price the same tokens cost $0.000356. Switching the model in that curl to gpt-6.1-sol-zdr sent the same prompt on a ZDR route; its receipt showed the zero-data-retention policy and a charge of $0.000272 for 18 input and 31 output tokens. Receipts are available from GET /v1/receipts/:reservationId, as our latency docs describe.

Fix LiteLLM's cost tracking

Without the model_info block, LiteLLM prices a call from its own model cost map. We ran the proxy without it. For an 18-in, 30-out call, LiteLLM recognized gpt-6.1-sol and recorded OpenAI's list price, $0.000336, while our receipt billed $0.000046. At that ratio, LiteLLM budgets would drain about seven times faster than your actual spend.

The model_info override, from LiteLLM's custom pricing docs, fixed that: with the config above, LiteLLM recorded $0.0000523 for a call we were billed $0.000048. Copy the current quote from the model page when you set it, and treat LiteLLM's number as an estimate, because quotes move and receipts are the record.

One more tip if you swap in a reasoning model: raise max_tokens. With a 64-token cap, our test calls to Claude Opus 5.5, GLM 5.3 and Kimi K3 spent the whole budget reasoning and came back as HTTP 502 empty_response. A request that ends in an error like that still costs what the provider billed, plus the routing fee.

Which should you choose?

Choose LiteLLM if you need per-team virtual keys and budgets on your own infrastructure and already hold provider contracts. Choose OpenRouter if you want one key for a very large catalog with no servers to run. If token price is your biggest cost, call GPU Router directly, or keep LiteLLM and add us as a provider.

Where GPU Router falls short

OpenRouter's catalog is about twice the size of our priced one, and on some models its price was lower. On gpt-oss-20b, the last row in the table, our cheapest eligible quote was about 3.6 times OpenRouter's.

When no discounted route can serve a model, the Reference provider serves it at list price plus our routing fee. Savings are capped at 95%.

If a list-price fallback would defeat the point, turn on minimum quoted savings in Settings. It stops paid requests when no eligible quote meets your minimum after fees, returning HTTP 503 minimum_savings_not_met instead of sending them at full price. It's off by default and filters quoted rates, so it can't guarantee your final bill.

We also serve only OpenAI Chat Completions. There's no OpenAI Responses API and no Anthropic Messages API, so Codex and Claude Code won't work by pointing their base URL at us. For more hosted and self-hosted options, see our OpenRouter alternatives comparison.

Try it with your LiteLLM setup

Browse live route prices in our model catalog, then create an API key and drop the config above into your proxy. New accounts get $1 in free prepaid credits, enough for roughly 20,000 calls like our test at its $0.000048 price. The quickstart covers the same endpoint from the OpenAI SDKs.

Frequently asked questions

Is LiteLLM free?

The open-source LiteLLM gateway is free to self-host; its pricing page says "Free forever." You still pay each model provider for tokens, plus whatever it costs to run the proxy and, if you want virtual keys, a Postgres database. LiteLLM Enterprise adds SSO, SCIM and support, priced by gateway capacity and "never per token."

Does OpenRouter mark up token prices?

Not by its own account. OpenRouter's pricing page says inference "is billed at the provider's list price on every plan." Its fee comes when you buy credits: 5.5% on the Standard plan ($0.80 minimum) and 8% on Business. Bring-your-own-key traffic carries no fee up to $25,000 of list-price inference a month, then 5%.

Can LiteLLM route requests to OpenRouter?

Yes. LiteLLM ships an OpenRouter provider: prefix the model with openrouter/ and set OPENROUTER_API_KEY. You keep LiteLLM's virtual keys and spend limits while OpenRouter picks the provider and bills you. The same pattern works for any OpenAI-compatible API, including GPU Router, using the openai/ prefix and an api_base.

Which is better for privacy, LiteLLM or OpenRouter?

LiteLLM runs on your own infrastructure, so no outside gateway sees your traffic, though each provider you call still receives your prompts. OpenRouter doesn't log prompts by default, but its provider filter allows providers that may store data unless you set data_collection to deny or enforce zero data retention. GPU Router sends a request with zdr: true only to a ZDR route, or returns HTTP 503 privacy_route_unavailable.

Is LiteLLM safe to self-host after the March 2026 supply-chain attack?

Yes, if you pin versions and verify what you install. LiteLLM says the compromised releases were 1.82.7 and 1.82.8, live on PyPI for about 40 minutes on March 24, 2026, and that its official proxy Docker image wasn't affected. A clean v1.83.0 followed, and LiteLLM signs its Docker images with cosign from v1.83.0-nightly on.

Compare live prices for every routable model, then call them through one OpenAI-compatible API. Browse models →