{"license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/","attribution":"Credit the site and link to the page the figure came from."},"source":{"name":"AI Gateway Tools","url":"https://aigateway.tools/blog/litellm-vs-openrouter/","home":"https://aigateway.tools/","method":"https://aigateway.tools/methodology/","data_month":"Dec 2026","note":"Compiled from public web pages. The page behind each fact is listed in `sources` where a document has one."},"generated_at":"2026-12-03T03:55:00.000Z","site":{"key":"gateway","name":"AI Gateway Tools","domain":"aigateway.tools"},"slug":"litellm-vs-openrouter","url":"https://aigateway.tools/blog/litellm-vs-openrouter/","json":"https://aigateway.tools/blog/litellm-vs-openrouter.json","title":"LiteLLM vs OpenRouter: run it yourself or rent an endpoint","description":"LiteLLM is a gateway you host under an MIT core; OpenRouter is a hosted router that charges on credits. Their own docs and pricing pages, side by side, with illustrative arithmetic on what each adds to the bill.","author":"Editorial desk","published_at":"2026-12-03","updated_at":"2026-12-03","tags":[],"reading_minutes":6,"sources":[{"url":"https://aigateway.tools/methodology/","title":"AI Gateway Tools: methodology"},{"url":"https://openrouter.ai/pricing","title":"OpenRouter pricing"},{"url":"https://www.litellm.ai/pricing","title":"LiteLLM pricing"},{"url":"https://github.com/BerriAI/litellm/blob/main/LICENSE","title":"LiteLLM LICENSE"}],"faq":[{"q":"Is LiteLLM free?","a":"The open source edition is listed at $0 on litellm.ai/pricing and you host it. Code outside the enterprise directory is MIT. Enterprise is an annual contract that the page says is never priced per token."},{"q":"What does OpenRouter charge?","a":"Its pricing page bills inference at the provider's list price and charges a fee when you buy credits: 5.5% on Standard, 8% on Business. With your own provider keys, the first $25,000 a month of list-price inference carries no fee, then 5%."},{"q":"Can Claude Code use either one?","a":"Both name Claude Code in their own docs, and both say they accept Anthropic-shaped as well as OpenAI-shaped requests."},{"q":"Which one names more providers?","a":"On the pages we read, LiteLLM names 31 providers and OpenRouter 16. OpenRouter's model catalogue is larger than its marketing pages show, so check the catalogue for a specific model."}],"body_markdown":"LiteLLM and OpenRouter solve the same problem, one API in front of many models, from opposite ends. LiteLLM is a gateway you run; OpenRouter is an endpoint you rent. This comparison uses what each one's own homepage, docs and pricing page say, read on 2 December 2026.\n\n## The short version\n\n| | LiteLLM | OpenRouter |\n|---|---|---|\n| Runs | Self-hosted | Managed |\n| Licence | MIT outside the enterprise directory | No public gateway repo |\n| API shape | OpenAI and Anthropic | OpenAI and Anthropic |\n| Providers named on its pages | 31 | 16 |\n| Controls named, of six | 6 | 4 (no load balancing or tracing found) |\n| SSO, RBAC, audit logs | All three | All three |\n| Fee on tokens | None; you pay your own hosting | 5.5% on credits (Standard) |\n| Adoption signal | 64,326 GitHub stars; 108,143,897 PyPI downloads in the month to 2 Dec | 4.4 on G2 from 99 reviews |\n\nStars and downloads are as GitHub and pypistats report them on the day we measured.\n\n## How the money works\n\nOpenRouter bills each request at the provider's list price and takes its fee when you buy credits, not per request. Its pricing page prints 5.5% on Standard and 8% on Business. Bring your own provider keys and the first $25,000 a month of list-price inference is free of fees; above that it charges 5%.\n\nLiteLLM's open source edition costs nothing in licence fees and nothing on tokens. You pay for the machines it runs on and the time to keep it patched, which no pricing page can tell you.\n\nIllustrative arithmetic, not a quote: a team spending $20,000 a month on tokens through OpenRouter credits on Standard pays $1,100 in fees ($20,000 x 5.5%). The same team with its own keys stays under the $25,000 allowance and pays no fee. On LiteLLM it pays no fee either way and carries the hosting. Put your own numbers in the [gateway fee calculator](/tools/gateway-cost-calculator/).\n\n<picture class=\"gw-fig\"><source media=\"(max-width: 599px)\" srcset=\"/sites/gateway/img/blog/fee-ladder-m.svg\"><img src=\"/sites/gateway/img/blog/fee-ladder.svg\" alt=\"Bar chart of what published gateway fees add to $1,000 of tokens, from $0 for Vercel, Cloudflare with your own keys and LiteLLM, to $55 for OpenRouter and Eden AI and $79 for Helicone Pro\" width=\"680\" height=\"484\" loading=\"lazy\" decoding=\"async\"></picture>\n\n## Providers and models\n\n<picture class=\"gw-fig\"><source media=\"(max-width: 599px)\" srcset=\"/sites/gateway/img/blog/gateway-providers-m.svg\"><img src=\"/sites/gateway/img/blog/gateway-providers.svg\" alt=\"Bar chart: OpenAI and Anthropic are each named by more than 85% of the 70 AI gateways; Gemini, Azure OpenAI, Mistral and Bedrock follow\" width=\"680\" height=\"450\" loading=\"lazy\" decoding=\"async\"></picture>\n\nAcross the 70 entries in the AI gateways list, OpenAI is named by 62 and Anthropic by 60, so both of these clear the basic bar. The difference is in the long tail. LiteLLM's pages name 31 providers, including Bedrock, Vertex AI, Azure OpenAI and local runtimes such as Ollama and vLLM, which matters if part of your traffic goes to a model you host. OpenRouter's pages name 16, but its catalogue is a moving list of hosted models, so the useful check is whether the exact model you need is in it.\n\n## Controls\n\nBoth name fallbacks, budgets, caching, guardrails, key management and rate limits. LiteLLM also names load balancing, tracing, semantic caching, PII redaction and cost-based routing. OpenRouter's pages name request logging, but we did not find load balancing or tracing on the pages we read. Both name SSO, role-based access and audit logs, which is what a security review asks for first.\n\n## Which one fits\n\n- Pick LiteLLM when prompts must stay in your network, when you call models you host yourself, or when a percentage on spend would add up to more than a server and an on-call rota.\n- Pick OpenRouter when you want one bill and one key for many hosted models today, with no infrastructure to run, and the fee on credits is acceptable.\n- Look at both lists of alternatives before you decide: [LiteLLM alternatives](/alternatives/litellm/) and [OpenRouter alternatives](/alternatives/openrouter/).\n\nScores and the rules behind them are on the [methodology page](/methodology/)."}