Skip to content
Agent Radar
List

Best LLM gateway: LiteLLM, Portkey, OpenRouter compared

Updated By Agent Radar5 min read

Short answer

Compare LiteLLM, Portkey and OpenRouter as an LLM gateway: documented surfaces, licenses and deployment options, checked 2026-10-14.

Top pick: LiteLLM. An open-source library with a unified interface to call 100+ LLMs in the OpenAI format, plus a self-hosted proxy gateway with virtual keys, cost tracking and an admin UI.

Quick comparison

Rank order is editorial
Best LLM gateway: LiteLLM, Portkey, OpenRouter compared: quick comparison
PickLicensePricingSource
1.LiteLLMOpen sourceNot statedGitHub
2.PortkeyMITNot statedGitHub
3.OpenRouterNot statedNot statedWebsite

As of 2026-10-14, LiteLLM is the best-documented fit among the three gateways checked here for a self-hosted setup. Portkey's gateway repository documents an MIT license and guardrails, while OpenRouter documents an API endpoint you call directly. The main distinction is a self-hosted proxy versus a service you call by URL.

Quick comparison

ToolBest fit (from sources)LicensePricing as statedPrimary source
LiteLLMSelf-hosted OpenAI-compatible proxy with virtual keys, cost tracking and an admin UINot stated (GitHub API reports no recognized license)not statedDocs, repo
PortkeyGateway routing to 1,600+ LLMs with 50+ guardrailsMITnot statedRepo, docs
OpenRouterCalling models through one HTTP endpoint with SDKs in several languagesnot statednot statedQuickstart

How we ranked

Ranking follows documented fit to this query: whether the sources describe the product as a gateway, how much gateway functionality is documented (routing, keys, cost tracking, guardrails), and whether a license is stated. This is an editorial ordering, not a benchmark.

How the options differ

LiteLLM: self-hosted proxy plus Python library

The LiteLLM docs describe an open-source library with a unified interface to call 100+ LLMs using the OpenAI format. The docs also list a self-hosted LLM Gateway (Proxy) with virtual keys, cost tracking and an admin UI.

The proxy is described as a self-hosted OpenAI-compatible gateway, and any client that works with OpenAI works with it without code changes. The docs show it running from a Docker container with a YAML config file.

Gateway features listed include a Router with retry, fallback and load balancing, centralized logging, guardrails and caching. Virtual keys carry per-key, per-team and per-user budgets.

The docs also state that LiteLLM is a unified gateway for LLMs, agents and MCP, with one endpoint for 100+ models, A2A agents and MCP tools.

Portkey: gateway with guardrails and an MIT repository

The Portkey gateway repository describes an AI gateway with integrated guardrails that routes to 1,600+ LLMs with 50+ guardrails through one API. The GitHub API reports an MIT license for the repository.

The Portkey docs show Python, Node and curl usage against a Portkey chat completions endpoint. They also show the OpenAI client pointed at a Portkey gateway URL with Portkey headers.

On deployment, the docs say a feature that does not store request and response bodies can be enabled on request. For enterprises, they say managed hosting can deploy Portkey inside private clouds.

The docs page also carries a banner stating that Portkey is now the Prisma AIRS AI Gateway. The excerpts do not explain what that rename changes.

OpenRouter: one endpoint and SDKs

The OpenRouter quickstart shows requests sent to a chat completions endpoint with a bearer API key. Examples are given in Python with requests, in TypeScript with fetch, and with curl.

The quickstart also lists an @openrouter/sdk package for TypeScript, a Python openrouter client, and an @openrouter/agent package with a tool-calling example. It also lists an MCP endpoint.

The excerpts do not describe OpenRouter's routing behavior, fallbacks, key management or license.

How we compared

We read the primary sources listed above, checked 2026-10-14: the GitHub repository metadata for LiteLLM and Portkey, the LiteLLM getting-started docs, the Portkey introduction page and the OpenRouter quickstart. We did not install, run or benchmark any of the tools, and we did not test latency, reliability or provider coverage.

Limitations

  • No pricing is stated in the cited excerpts for any of the three tools. The Portkey page lists a pricing question, but its answer is not in the excerpts.
  • The LiteLLM repository metadata reports no recognized license, so reuse terms are not stated in the cited sources.
  • Provider counts (100+ and 1,600+) come from each project's own descriptions and are not comparable claims.
  • OpenRouter's license, self-hosting options and gateway features beyond the quickstart are not stated in the cited sources.
  • Performance claims in repository descriptions were not verified.

Explore the hubs for LiteLLM, Portkey, OpenRouter and the Agent infra category. Newest same-tool launch: LiteLLM v1.105.0 adds MCP protocol version settings. Moving off LiteLLM? Read LiteLLM alternatives open source: Portkey and OpenRouter.

The picks

In rank order
  1. Rank 1

    LiteLLM

    Open source

    An open-source library with a unified interface to call 100+ LLMs in the OpenAI format, plus a self-hosted proxy gateway with virtual keys, cost tracking and an admin UI.

    Pros

    • Self-hosted OpenAI-compatible proxy; clients work without code changes
    • Router with retry, fallback and load balancing
    • Virtual keys with per-key, team and user budgets

    Cons

    • GitHub API reports no recognized license for the repository
    • Pricing not stated in the cited sources
    • The library and litellm-core cannot be installed together
  2. Rank 2

    Portkey

    MITOpen source

    A gateway repository described as routing to 1,600+ LLMs with 50+ guardrails through one API; docs now carry a Prisma AIRS AI Gateway banner.

    Pros

    • MIT license reported by the GitHub API
    • Docs describe no-storage option on request and managed private-cloud hosting for enterprises
    • Python, Node and curl usage documented

    Cons

    • Pricing answer not included in the cited excerpts
    • Docs show a rename to Prisma AIRS AI Gateway without explaining its effect
    • Self-hosting steps not stated in the cited excerpts
  3. Quickstart documents a chat completions endpoint at openrouter.ai, with TypeScript and Python SDKs, an agent package and an MCP endpoint.

    Pros

    • Single documented HTTP endpoint with curl, Python and TypeScript examples
    • SDKs and an agent package are documented
    • MCP endpoint listed

    Cons

    • License not stated in the cited sources
    • Pricing not stated in the cited sources
    • Routing, fallback and key management not described in the excerpts

Questions

What is the best LLM gateway in 2026?

Among the three tools checked on 2026-10-14, LiteLLM has the most gateway functionality documented in the cited sources: a self-hosted proxy with virtual keys, cost tracking, an admin UI and a Router with fallback. No benchmark was run, so this is a documentation-based ranking.

What is the best open source LLM gateway?

Portkey's gateway repository reports an MIT license through the GitHub API. LiteLLM's docs call it an open-source library, but the GitHub API reports no recognized license for its repository.

Can I self-host an LLM gateway?

LiteLLM's docs describe the proxy as a self-hosted OpenAI-compatible gateway that runs as a container. Portkey's docs say enterprises can get managed hosting inside private clouds; self-hosting steps are not stated in the cited excerpts.

How much do these LLM gateways cost?

Pricing is not stated in the cited sources for LiteLLM, Portkey or OpenRouter. A repository license does not imply that hosted usage is free.

More guides

View all
Comparison

Agno vs CrewAI: agent frameworks compared

Agno vs CrewAI compared from repo metadata and product sites: Agno's agent service and AgentOS layer versus CrewAI's enterprise build and runtime platform.

Top pick
Agno
Read time
5 min
Updated
Comparison

Agno vs LangChain: agent frameworks compared

Agno vs LangChain compared from repo metadata and docs: Agno targets running agents as a service, LangChain a model-agnostic agent API.

Top pick
Agno
Read time
3 min
Updated
Comparison

Agno vs LangGraph: agent frameworks compared

Agno vs LangGraph compared from repo metadata and docs: service layer for agents versus a durable orchestration runtime, checked 2026-10-14.

Top pick
Agno
Read time
5 min
Updated