Quick answer

OpenRouter is a hosted marketplace: one key, hundreds of models, pay per token with a small fee, no infrastructure. LiteLLM is an open-source proxy you run yourself, with virtual keys, budgets, and 100+ providers. Portkey is a hosted (or self-hosted) platform that adds guardrails, PII filtering, prompt management, and observability to routing. Solo developers mostly use OpenRouter; teams with governance needs run LiteLLM; product teams wanting a managed platform with safety features pick Portkey.

Every serious AI product ends up calling more than one model provider, and every one of them eventually needs to answer the same questions: who spent what, what happens when a provider is down, and how do we swap models without redeploying. A gateway answers those questions in one place.

OpenRouter: the marketplace

OpenRouter resells access to models from every major lab and most open-weight hosts through one OpenAI-compatible endpoint. You pay the provider's price plus a small margin, top up credits, and switch models by changing a string. It handles fallbacks between providers of the same open model and shows live pricing and uptime. It is the fastest way to try many models and the default for indie developers and BYOK tools. What it is not is a governance layer: per-team budgets and audit logs are basic, and your traffic goes through a third party.

LiteLLM: the self-hosted proxy

LiteLLM is an open-source Python proxy that normalises 100+ providers to the OpenAI format. Run it in your own cloud and it issues virtual keys with budgets and rate limits per team or app, logs spend, load-balances across deployments, and fails over on errors. Nothing leaves your network except the calls to providers. The cost is operating it: releases are frequent, and provider quirks occasionally leak through. Enterprise support and some features are paid.

Portkey: the managed platform

Portkey routes, retries, caches, and falls back like the others, and adds what the others leave to separate tools: input and output guardrails, PII detection, prompt templates with versioning, and full request analytics. It is hosted by default with a self-hosted option for regulated customers. The free tier covers development; Pro starts at $49 a month. The considerations are the same as any hosted gateway: another vendor in the request path and a subscription on top of model spend.

Which one

  • Solo developer, side project, or BYOK coding agent: OpenRouter
  • Engineering org that must keep keys and logs internal: LiteLLM
  • Product team that wants routing plus guardrails and analytics without ops: Portkey
  • Large enterprise: often LiteLLM or self-hosted Portkey behind an internal platform

Bottom line

All three solve the "one API for every model" problem. The choice is about who runs it and what else you need in the same hop. Start on OpenRouter, graduate to LiteLLM when governance matters, and look at Portkey when guardrails and observability would otherwise mean two more tools.