OpenRouter vs LiteLLM vs Portkey: The 2026 AI Gateway Comparison
Choosing an AI gateway in 2026 is one of the highest-leverage infrastructure decisions you make. The right gateway saves 5-20% on AI costs, provides fallback when providers rate-limit, and gives you observability across multiple LLMs. The wrong gateway adds friction without value.
Three gateways dominate production use: OpenRouter (managed, multi-provider), LiteLLM (open-source self-hosted), and Portkey (enterprise observability). Each takes a different approach. For most teams, the gateway matters less than the free credits you route through it - and AI Perks covers credit programs for every major provider.

Headline Comparison
| Gateway | Type | Pricing | Best For |
|---|---|---|---|
| OpenRouter | Managed SaaS | 5.5% fee on credits | Solo devs, small teams |
| LiteLLM | Open-source self-hosted | Free (or Cloud subscription) | Production AI apps |
| Portkey | Enterprise observability | Subscription + free tier | Compliance + governance |
The three solve different problems. Most teams pick one and stay loyal. Heavy users sometimes run two for different workloads.
OpenRouter: The Easy Choice
OpenRouter is a managed API gateway with 200+ models behind one API key.
Strengths
- Zero infrastructure - sign up, paste API key, done
- 200+ models including Claude, GPT, Gemini, Grok, DeepSeek, all Llama variants
- Automatic fallback when a provider rate-limits
- BYOK support - route your own provider keys through OpenRouter
- Consolidated billing - one bill for all models
- Generous free tier on selected open-source models
- Pay-as-you-go with prepaid credits
Weaknesses
- 5.5% markup on all credits used (the "OpenRouter tax")
- Managed = vendor lock-in to OpenRouter routing logic
- Less observability than Portkey
- Cannot self-host the routing logic
Best for: Solo developers, small teams, prototypes, anyone who wants zero infra setup.

LiteLLM: The Power-User Open-Source Choice
LiteLLM is an open-source Python proxy that exposes 100+ LLM APIs behind a unified OpenAI-compatible interface.
Strengths
- Free open-source core - no subscription required
- Self-hosted - you own the routing logic
- OpenAI-compatible API out of front - drop-in for existing code
- 100+ provider integrations including Claude, GPT, Gemini, Grok, Bedrock, Vertex
- Caching, fallback, retry, observability all built-in
- LiteLLM Cloud for managed option if needed
- Cost tracking with per-request granularity
Weaknesses
- Self-host complexity - you manage the proxy
- Less polished UI than Portkey
- Documentation requires reading - not always intuitive
- Cloud subscription if you do not self-host
Best for: Engineering teams building production AI apps with full control.
Portkey: The Enterprise Choice
Portkey is an enterprise observability and routing platform for AI.
Strengths
- Best-in-class observability - traces, metrics, costs per team
- Prompt versioning and A/B testing
- Caching with custom TTLs
- Team management with RBAC
- Compliance-grade audit logs
- Multi-tenant for AI platforms
- Free tier generous enough for solo use
Weaknesses
- Subscription required at scale ($199-$999+/month)
- Heavier feature set can be overkill for solo devs
- Less "drop-in" simple than OpenRouter
Best for: Enterprise AI platforms with compliance, monitoring, and multi-team requirements.

Detailed Feature Comparison
| Feature | OpenRouter | LiteLLM | Portkey |
|---|---|---|---|
| Provider count | 200+ | 100+ | 100+ |
| Open source | No | Yes | Partial |
| Self-host | No | Yes | Yes (Cloud) |
| BYOK support | Yes | Yes | Yes |
| Fallback routing | Built-in | Configurable | Built-in |
| Caching | Built-in | Yes | Yes, advanced |
| Observability | Basic dashboard | OSS metrics | Best in class |
| Cost tracking | Yes | Yes | Yes, per-team |
| Prompt versioning | No | Limited | Yes |
| A/B testing | No | Limited | Yes |
| Compliance / SOC 2 | Limited | DIY | Yes (Pro+) |
| Pricing | 5.5% fee | Free OSS | $0-$999+/month |
Cost Math: Real Workload
For a production AI app burning $5,000/month in raw API costs:
| Gateway | Monthly Cost | Effective AI Spend |
|---|---|---|
| Direct provider (no gateway) | $5,000 | $5,000 |
| OpenRouter | $5,000 + 5.5% = $5,275 | $5,275 |
| LiteLLM self-hosted | $5,000 + ~$50 infra | ~$5,050 |
| LiteLLM Cloud | $5,000 + $99-$499 subscription | $5,099-$5,499 |
| Portkey | $5,000 + $199-$999 subscription | $5,199-$5,999 |
LiteLLM self-hosted is cheapest at scale. Portkey is most expensive but justifies cost with enterprise features.
For users with free credits, gateway choice matters less - the credits absorb the gateway costs.

How Free Credits Change the Math
With $25,000+ in stacked free credits across Anthropic, OpenAI, Gemini, and others:
| Gateway | Effective Cost (Free Credits) |
|---|---|
| OpenRouter | 5.5% of credit pool ($1,375 effective) |
| LiteLLM self-host | $50/month infrastructure |
| LiteLLM Cloud | $99-$499 subscription |
| Portkey | $199-$999 subscription |
For maximum credit efficiency, LiteLLM self-hosted preserves the full free credit pool. OpenRouter's 5.5% fee eats $1,375 of a $25K credit budget.
The credit programs that fund this stack are at AI Perks.
When to Pick Which
Pick OpenRouter If
- You are a solo dev or small team (1-5 people)
- You want zero infrastructure
- You will not burn enough to make the 5.5% fee material
- You want fastest time to multi-provider routing
Pick LiteLLM If
- You are an engineering team with infra capacity
- You ship production AI products at scale
- You want full control of routing logic
- You want maximum credit efficiency at scale
Pick Portkey If
- You are an enterprise AI platform
- You need compliance and governance
- You manage multiple teams on shared infra
- You can justify subscription pricing
Run No Gateway If
- You use only one provider (Anthropic only or OpenAI only)
- You are prototyping with no multi-provider needs
- You handle fallback in app code

Stacking Free Credits Across Gateways
Regardless of gateway choice, the biggest cost lever is free credits across providers:
| Source | Available Credits | How to Get |
|---|---|---|
| Free Anthropic credits | $1,000 - $25,000+ | AI Perks Guide |
| Free OpenAI credits | $500 - $50,000+ | AI Perks Guide |
| Free Gemini / Vertex credits | $300 - $100,000+ | AI Perks Guide |
| Free xAI / Grok credits | $25 - $5,000 | AI Perks Guide |
| Free DeepSeek / Together AI | $25 - $1,000 | AI Perks Guide |
| Free Mistral credits | $50 - $5,000 | AI Perks Guide |
Total stacked potential: $1,900 - $186,000+ in cross-provider credits
The exact program names and application order are inside AI Perks. The AI Perks team comes from Y Combinator, Techstars, Antler, 500 Global, and Google for Startups.
Real-World Setup: LiteLLM with Free Credits
The optimal setup for most production teams:
# litellm.yaml
model_list:
- model_name: smart-claude
litellm_params:
model: anthropic/claude-sonnet-4-6
api_key: $ANTHROPIC_API_KEY # tied to free credits
- model_name: smart-gpt
litellm_params:
model: openai/gpt-5-5
api_key: $OPENAI_API_KEY # tied to free credits
- model_name: cheap-fallback
litellm_params:
model: deepseek/deepseek-v4
api_key: $DEEPSEEK_API_KEY
router_settings:
routing_strategy: usage-based-routing
fallbacks:
- model: smart-claude
providers: [smart-gpt, cheap-fallback]
App calls smart-claude. LiteLLM routes to Anthropic, falls back to GPT if rate-limited, falls back to DeepSeek if both fail. All using free credits.

Step-by-Step: Set Up Your Gateway
Step 1: Get free credits via AI Perks across all major providers.
Step 2: Pick gateway based on your team size: OpenRouter (solo), LiteLLM (team), Portkey (enterprise).
Step 3: Configure provider API keys tied to free credit accounts.
Step 4: Set fallback routing rules for rate-limit handling.
Step 5: Monitor cost per provider and shift traffic to providers with remaining free credits.
Step 6: Re-evaluate quarterly as free credits expire and refresh sources via AI Perks.
What Heavy Users Are Saying
From Hacker News and dev Twitter in May 2026:
- "LiteLLM self-hosted with free Anthropic credits is the cheapest serious setup. OpenRouter's 5.5% adds up at scale."
- "OpenRouter is the right answer for solo devs. The 5.5% is fair pricing for zero infrastructure."
- "Portkey saved us during a SOC 2 audit. The audit logs and team RBAC are best-in-class."
- "I run LiteLLM for production and OpenRouter for prototypes. Different tools for different speeds."
The multi-gateway pattern is common among heavy users.

Frequently Asked Questions
OpenRouter vs LiteLLM - which is better?
OpenRouter for solo devs and small teams (zero infra). LiteLLM for production teams (no markup fee, full control). Both support BYOK with free credits from AI Perks.
Is OpenRouter worth the 5.5% fee?
For solo devs and small teams, yes - the time savings from zero infrastructure beat the fee. For production teams burning $5K+/month, LiteLLM self-hosted is more cost-effective.
Can I use LiteLLM with Claude Code?
Yes, LiteLLM exposes OpenAI-compatible API which Claude Code can be configured to use. Stack with free Anthropic credits from AI Perks.
Does Portkey have a free tier?
Yes, Portkey has a generous free tier for solo and small team use. Enterprise features (compliance, RBAC, custom retention) require paid tiers starting at $199/month.
What's the cheapest gateway?
LiteLLM self-hosted has zero markup and only $50/month infrastructure cost. With free credits via AI Perks, it preserves the full credit pool. Cheapest serious setup.
Can I use multiple gateways?
Yes, common pattern is OpenRouter for prototypes and LiteLLM for production. Same credit pools work across both. Free credits at AI Perks cover both setups.
Which gateway has the most providers?
OpenRouter leads with 200+ models. LiteLLM has 100+ providers. Portkey covers 100+. All major frontier providers are supported across all three.
The Verdict
OpenRouter wins on simplicity. LiteLLM wins on cost-efficiency at scale. Portkey wins on enterprise governance. The right choice depends on team size and stage. Underneath any gateway, free credits across providers from AI Perks are the real cost lever - get them stacked and gateway choice becomes secondary.
Stop overpaying for AI inference. Get $1,900-$186,000+ in stacked credits at getaiperks.com.