🤖 AI Hot

OpenRouter vs Portkey: Which LLM Gateway Fits Your Stack?

A
Alex Chen

If you’re building something that talks to more than one LLM, you’ve probably hit the point where direct API calls become a mess. Different auth headers, different response formats, different error codes, different rate limits. After the third provider integration, most teams start looking for a gateway — a single API that abstracts away all the differences and gives you one endpoint to rule them all.

Two options dominate the conversation right now: OpenRouter and Portkey. They solve overlapping problems with fundamentally different philosophies, and picking the wrong one for your use case means either overpaying for features you don’t need or hitting walls on features you do.

I’ve used both in production-ish settings (staging environments with real traffic, not just quick API demos), and the differences matter more than the documentation lets on. Here’s the breakdown.

OpenRouter: The Universal Adapter

OpenRouter is a hosted routing network. You buy credits (or bring your own API keys for specific providers), send requests to api.openrouter.ai, and it figures out which provider to route to based on availability, pricing, and latency. You don’t manage individual provider keys. You don’t deal with outages at any single provider. You just send your prompt and get a response from whichever provider OpenRouter selects.

The scale here is genuinely impressive. OpenRouter covers 300+ models across 70+ providers — everything from frontier models like GPT-5.5 and Claude Opus 4.8 to niche open-source models running on obscure providers. About 20 models are free to use (mostly smaller open models like Llama 4 Scout and Qwen 3 8B). For paid models, OpenRouter charges the provider’s base rate plus a 5.5% platform fee, with the first 1 million free tokens per model to let you evaluate before committing.

The routing logic is where OpenRouter earns its keep. The auto-failover means if one provider goes down, your request silently routes to another provider offering the same model. For models available on multiple providers (GPT-5.5 is on at least 4 providers through OpenRouter), this means effectively zero downtime. The latency optimization routes your requests to the provider with the lowest current response time. And the EU routing option keeps data within European data centers for GDPR compliance.

The pricing model is worth understanding because it’s unusual for an API gateway. OpenRouter doesn’t mark up model pricing (the “zero markup” claim). You pay what the provider charges, plus the 5.5% OpenRouter fee. For a $2.50/M token model, that’s about $2.64 total. The first million tokens per model are free, which makes evaluation genuinely zero-cost — you can try Claude Opus 4.8 for a few hundred requests without spending anything.

OpenRouter also has a zero data retention policy. They don’t log prompts or completions. For teams worried about sending proprietary code or customer data through a third-party router, this is table stakes, and OpenRouter meets it.

Portkey: The AI Control Plane

Portkey takes a different approach. Where OpenRouter is a routing layer, Portkey is what they call an “AI control plane” — it sits between your application and the model providers, adding governance, prompt management, guardrails, and observability on top of the routing.

Portkey was acquired by Palo Alto Networks in early 2026, which tells you something about where this market is heading. The acquisition brought enterprise security features (HIPAA compliance, SSO, private deployment options) that Portkey didn’t have as an independent startup.

The model coverage is wider than OpenRouter’s. Portkey provides a unified API for 1,600+ LLMs, including all the major frontier models, open-source models, and specialized models for embeddings, image generation, and audio. The unified API means you write your request once and Portkey translates it to each provider’s format.

But the real differentiators are the governance features. Portkey’s prompt management system lets you version your prompts, A/B test them across models, and roll back to previous versions. The guardrails layer can detect PII in prompts and responses, block toxic content, and enforce custom safety policies before requests leave your infrastructure. The observability dashboard shows latency, cost, and error rates per model, per prompt version, and per user — granular enough for serious production debugging.

Pricing is based on logs rather than tokens. The Developer plan is free. The Production plan starts at $49/month with per-log pricing beyond a threshold. For high-volume applications, the log-based pricing can be cheaper than OpenRouter’s per-token markup, especially if you’re sending millions of tokens per month. The enterprise plan adds SSO, HIPAA compliance, and private cloud deployment.

The Key Differences That Actually Matter

I want to focus on the differences that affect real engineering decisions, not the feature comparison matrix you’d get from either company’s landing page.

Authentication model. OpenRouter uses a simple API key with pre-loaded credits. No per-provider key management needed. Portkey sits on top of your own provider keys — you bring your OpenAI key, your Anthropic key, and Portkey adds the control layer. This means Portkey can’t route around a provider outage the way OpenRouter can (it doesn’t manage keys for multiple providers offering the same model), but it also means you maintain direct relationships with providers, which matters for enterprise procurement.

Latency. OpenRouter adds minimal overhead — typically 50-100ms on top of the provider’s response time. Portkey adds more, usually 200-500ms, because it’s doing prompt injection, guardrail checks, and logging on every request. For real-time chat applications, that extra 300ms is noticeable. For batch processing or async workflows, it doesn’t matter.

Provider lock-in. OpenRouter makes switching providers trivial — change one line in your API request and you’re talking to a different model family. Portkey’s prompt management and guardrail configurations are somewhat tied to specific model behaviors, which creates a soft lock-in. You can switch, but you’ll need to retest your guardrails and re-benchmark your prompts.

Free tier. OpenRouter’s free tier is broader — 20 free models, first 1M tokens free on paid models. Portkey’s free tier is limited to the Developer plan with usage caps. For solo developers or very small teams evaluating options, OpenRouter’s free tier is significantly more generous.

Model Serving Architecture Comparison

The technical architecture differences matter for production model serving decisions. OpenRouter operates a pure routing model — no model execution happens on their infrastructure. They maintain real-time availability and latency data for 70+ provider endpoints, run continuous health checks, and apply weighted round-robin routing with automatic failover. The model serving is entirely delegated to the downstream providers.

This makes OpenRouter’s architecture simple and reliable. There’s no model serving infrastructure to maintain, no GPU clusters to manage, no cold-start problems. The tradeoff is that OpenRouter can’t optimize inference performance — they can route to the fastest available provider, but they can’t quantize the model or batch requests for better throughput.

Portkey’s architecture is more layered. For simple model serving, they also route to provider endpoints. But for organizations that want inference optimization — quantization, request batching, speculative decoding — Portkey’s enterprise plan includes a model serving layer that can run optimized inference on dedicated infrastructure. This means lower per-token costs at high volumes and consistent latency under load, but it requires more setup and costs more upfront.

For most teams running under 10 million tokens per day, this difference is academic. Both gateways will serve your requests reliably, and the cost difference is negligible at that scale. The architecture only matters when you’re running inference at enterprise volumes where shaving a few cents per million tokens adds up to real money.

Who Should Use Which

Use OpenRouter if:

  • You’re a solo developer or small team that wants maximum model access with minimum setup
  • You need automatic provider failover and don’t want to manage keys for 5+ providers
  • You’re evaluating multiple models and want to switch between them without changing infrastructure
  • You’re cost-sensitive and OpenRouter’s free tier plus zero-markup pricing works for your volume
  • You’re building something where 50-100ms of routing overhead is acceptable

Use Portkey if:

  • You need governance features (PII detection, content filtering, audit logs)
  • You’re running prompt experiments and need version management and A/B testing
  • Your organization requires SSO, HIPAA compliance, or private deployment
  • You’re sending enough volume that the per-log pricing beats OpenRouter’s per-token markup
  • You need the inference optimization layer for cost reduction at scale

Use both if:

  • You want OpenRouter’s routing for model access and Portkey’s governance layer on top
  • This is actually a supported pattern: route actual inference through OpenRouter while Portkey handles prompt management and guardrails

The Bottom Line

OpenRouter and Portkey aren’t really competitors in the way that, say, Vercel and Netlify are. They solve adjacent problems with some overlap, and the right answer for most teams is probably “start with OpenRouter, add Portkey when you need governance.”

What this looks like in practice: your code talks to OpenRouter’s API with a single key, and you get access to 300+ models with automatic failover. Six months later, when your product actually has users and someone asks about SOC 2 compliance, you keep OpenRouter for model routing and add Portkey’s control plane for prompt management and guardrails. The two integrate cleanly — Portkey can proxy through OpenRouter as its model serving backend.

The thing I keep noticing is how fast this layer is maturing. Two years ago, the LLM gateway space was a handful of open-source proxies. Now we have VC-funded platforms with 1,600-model coverage and enterprise compliance features, one of which just got acquired by a $100B+ security company. The gateway layer is becoming real infrastructure, and the choices teams make now will shape their architecture for years.

If I had to pick one, I’d go with OpenRouter for early-stage projects and Portkey for anything that touches customer data or needs to pass a security review. OpenRouter costs nothing to start and gets you model access in minutes. Portkey costs more upfront but saves you months of building compliance infrastructure. But the honest answer is that most teams doing serious LLM work will end up using something from both categories — a routing layer for model access and a control layer for governance, sometimes literally both products wired together. These aren’t mutually exclusive, and treating them as a binary choice misses the point.

Sources: OpenRouter documentation and API reference; Portkey documentation and pricing page; hands-on testing with both services in staging environments. Both services offer free tiers sufficient for evaluation — there is no reason to choose based on pricing alone until you reach meaningful production volume.

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen