The short answer
OpenRouter combines hosted model access with unified billing. LiteLLM offers a Python SDK and a self-hosted proxy. Portkey, now owned by Palo Alto Networks, combines a hosted gateway with observability and prompt management, and publishes an open-source gateway. Start with who should operate the gateway, then compare billing and the controls your application needs.
| Decision | OpenRouter | LiteLLM | Portkey |
|---|---|---|---|
| What it is | Hosted model marketplace API with unified billing | Python SDK or self-hosted AI Gateway (proxy server) | Hosted AI gateway and production tools; open-source gateway available |
| License and self-hosting | Use the hosted API | MIT outside enterprise/; enterprise/ has separate license terms | MIT-licensed gateway; can run locally or be self-hosted |
| Free and paid options | Free models; Standard platform fee 5.5%, Business 8%; Enterprise discounts available | Open-source self-hosting has no license fee; Enterprise requires a sales quote | Free Developer plan for evaluation; Production $49/month; Enterprise custom pricing |
| Provider credentials | Credits or BYOK; pay-as-you-go BYOK includes $25,000/month of list-price inference without a fee, then 5% | Configure your provider API keys in the SDK or gateway | Use provider credentials through the gateway |
| Routing and failover | Provider ordering, load balancing and provider fallbacks | Routing across deployments, load balancing and LLM fallbacks | Provider/model fallbacks, conditional routing, load balancing and retries |
| Caching | Prompt caching on supported providers and models | Configurable exact-match and semantic response caches | Simple caching on Developer; simple and semantic caching on Production |
| Budgets and observability | Budgets and spend controls on Standard; activity logs and export | Virtual keys, budgets, rate limits, spend tracking, request/response logging and Prometheus metrics | Logs and traces; granular budgets and rate limits listed on Enterprise |
| Guardrails | Spending, model/provider restrictions, prompt injection checks and sensitive-data filters | Configurable integrations with pre-call and post-call hooks | Basic guardrails on Developer; partner and PRO guardrails on Production; custom guardrails on Enterprise |
| Data controls | Prompt retention is opt-in; routing can restrict requests to ZDR endpoints | Self-hosted deployment: no telemetry or data stored on LiteLLM servers | Enterprise organization-level Metrics Only mode omits request/response content |
| Consider when | You want hosted model access and one billing account | You want a Python library or to operate your own gateway | You want a gateway with logs, traces and prompt management |
Choose who operates the gateway
OpenRouter provides model access through a hosted API and combines billing across providers. LiteLLM can sit inside Python code as an SDK or run as a centralized proxy. Portkey offers a hosted gateway with logs, traces and prompt management, plus a gateway you can self-host. Palo Alto Networks completed its acquisition of Portkey on May 29, 2026 and made Prisma AIRS Gateway, which incorporates Portkey’s gateway capabilities, generally available on July 16; Portkey’s pricing page now says Portkey is now Prisma AIRS AI Gateway and still lists its plans and the open-source gateway.
LiteLLM’s root license puts code outside enterprise/ under MIT and gives enterprise/ separate terms. Portkey’s gateway repository uses MIT. Treat those gateway licenses separately from the paid platform plans.
Compare the gateway bill
OpenRouter charges a fee when credits are purchased and passes through provider inference prices. Its pricing page lists Standard at 5.5% and Business at 8%. For pay-as-you-go BYOK, the fee-free allowance is $25,000 of list-price inference per month; usage above it incurs a 5% fee deducted from OpenRouter credits. This allowance is measured in inference cost, not requests.
LiteLLM’s open-source gateway has no self-hosting license fee. Enterprise pricing depends on annual gateway request capacity, deployment architecture and support. Portkey lists a free Developer plan for evaluation, a $49/month Production plan and custom Enterprise pricing. Budget for your model usage and any infrastructure alongside the gateway plan.
Match features to the workload
All three document routing and fallbacks. OpenRouter supports provider ordering and provider/model prompt caching. LiteLLM routes across deployments and supports exact-match and semantic response caching. Portkey documents conditional routing, retries and load balancing; its Production plan adds semantic caching to simple caching.
For team controls, LiteLLM’s open-source plan lists virtual keys, budgets, rate limits and request logging. OpenRouter lists budgets on Standard and documents guardrails for spending, model access and sensitive data. Portkey lists logs and traces, with granular budgets and rate limits on Enterprise. Check the plan and configuration for the controls you need.
Check logging and decide on fit
OpenRouter makes prompt retention opt-in and lets requests target only zero data retention (ZDR) endpoints. LiteLLM says self-hosted instances send no telemetry to its servers. Portkey’s Enterprise logging settings include Metrics Only mode, which retains operational metrics without request or response content. These statements describe gateway controls; review the selected model provider’s data policy too.
As a decision guide, consider OpenRouter for hosted model access and unified billing, LiteLLM for a Python SDK or a gateway you operate, and Portkey for a gateway with observability and prompt management. Test your own failure handling, cache behavior and logging configuration before choosing.
Sources & method
Official documentation was checked on 2026-10-12. Selection advice is our assessment. Interfaces and requirements may change; check the linked source for the version you intend to use.
- OpenRouter pricing
- OpenRouter FAQ: credits, billing and usage
- OpenRouter BYOK
- OpenRouter provider routing
- OpenRouter prompt caching
- OpenRouter guardrails
- OpenRouter data collection
- LiteLLM SDK and proxy repository
- LiteLLM license and enterprise exception
- LiteLLM pricing
- LiteLLM routing
- LiteLLM proxy caching
- LiteLLM guardrail hooks
- LiteLLM self-hosted data privacy
- Portkey pricing and plan features
- Palo Alto Networks Form 10-K (fiscal 2026): Portkey acquisition and Prisma AIRS Gateway
- Portkey introduction and current documentation branding
- Portkey AI gateway and self-hosting
- Portkey gateway MIT license
- Portkey guardrails by plan
- Portkey Enterprise request logging
How SOTA reviews projects · Suggest a correction · Download the evaluation checklist