· openrouter / llm / api
OpenRouter vs direct API — when the gateway pays off
OpenRouter wins for multi-model projects and automatic failover. Direct API wins at high volume or for compliance-critical workloads. Here is how to decide.
By Ethan
1,872 words · 10 min read
Pick OpenRouter if you’re running more than one model family, want automatic failover without writing retry logic, or are spending under $5,000 per month where the platform fee costs less than a few hours of your time. Pick the direct API if you’re single-provider at high volume, have a compliance requirement naming specific vendor endpoints, or need provider-native features that a gateway layer doesn’t expose. The rest of this article gives you the evidence to make that call.
Who this is for
Developers who are already spending real money on LLM APIs and are evaluating whether to add a gateway layer. If you’re still in the $20-of-free-credits phase, bookmark this and come back when you have a production workload — the trade-offs only matter at scale.
What we evaluated
OpenRouter token pricing as of May 2026, cross-referenced against Anthropic and OpenAI direct rates. Latency from an opper.ai benchmark published April 2026: 200 calls to GPT-4.1, comparing OpenRouter and OpenAI direct from the same origin. Uptime from status.openrouter.ai, both current and 2025 historical. Cost analysis cross-referenced with tokenmix.ai. OpenRouter’s model catalog, routing options, and security documentation from openrouter.ai.
Pricing — “no markup” is mostly true, but read the fine print
OpenRouter passes provider token prices through to you without a per-token markup. As of May 2026, rates match provider-direct pricing: Claude Opus 4.7 at $5 input / $25 output per million tokens, Sonnet 4.6 at $3/$15, Haiku 4.5 at $1/$5. OpenAI and Google rates are similarly pass-through.
The actual cost is a 5.5% platform fee on credit card top-ups. There is no per-API-call fee. The fee applies when you add credits — not when you make a request.
Whether that’s cheap depends entirely on your spend:
| Monthly LLM spend | OpenRouter fee | Approximate dev-time equivalent |
|---|---|---|
| $500 | ~$28 | ~14 min |
| $1,000 | ~$55 | ~30 min |
| $5,000 | ~$275 | ~2.3 hrs |
| $10,000 | ~$550 | ~4.6 hrs |
At $1,000/month, the fee is a rounding error on your total infrastructure cost. At $10,000/month, you’re paying $550/month for a feature set you could build yourself — but only if you actually build it, maintain it, and operate it. The reliability engineering required to replicate smart routing and automatic failover is not free. For most teams, $550 buys more than the equivalent in engineering hours.
The break-even question is not about token volume. It’s about whether you want to own and maintain multi-provider routing infrastructure. If yes, going direct and building your own saves the fee. If no, pay the fee.
The task-level analysis of when routing to cheaper models changes the fee math more than gateway selection does is in LLM cost routing: when Haiku beats Opus and when it does not.
Latency — OpenRouter can be faster, not slower
This is counter-intuitive. The standard assumption is that any gateway adds latency. In practice, the opposite is measurable.
The opper.ai benchmark (April 2026, 200 calls, GPT-4.1) found OpenRouter delivered first token 70ms faster than OpenAI direct from the same origin. Throughput told a different story: 73.2 tok/s on OpenRouter versus 81.8 tok/s direct — a 10% reduction in sustained generation speed. You trade some throughput for faster time-to-first-byte.
The mechanism is OpenRouter’s smart routing. Rather than always sending requests to a fixed provider endpoint, it routes dynamically to the replica with the lowest current latency, routing around congested instances instead of queuing. The result is measurably lower p95 latency compared to single-provider pinning — though the exact magnitude depends on your model, provider load, and origin geography.
That said, the opper.ai result was one workload on one origin against one model. Other measurements show OpenRouter adding 50–70ms of overhead in steady-state conditions, which is what you’d expect from an additional network hop. Whether smart routing offsets that depends on provider load at call time, your origin geography, and which model you’re targeting.
If your application is latency-sensitive — streaming chat, voice, anything where time-to-first-byte matters to the user — don’t assume either direction. Run your actual workload through both paths and measure. The answer will differ by model, region, and time of day.
Failover — automatic, but test your fallbacks
The main reason teams add a gateway is automatic failover. With OpenRouter, you pass a models array in the request:
response = client.chat.completions.create(
model="openai/gpt-4.1",
extra_body={
"models": [
"openai/gpt-4.1",
"anthropic/claude-sonnet-4-6",
"google/gemini-2.0-flash"
]
},
messages=[{"role": "user", "content": prompt}]
)
If the first model hits a rate limit, returns a 5xx, or rejects content due to moderation, OpenRouter automatically falls through to the next model in the list. The fallback is priced at whatever model actually handled the request. You write no retry logic, no circuit breaker, no health-check poller.
You can also tune routing behavior across providers: sort by price, throughput, or latency, and explicitly ignore or allow specific providers within a model family. That level of granularity would take non-trivial engineering to replicate directly.
The gotcha: fallback models respond differently. If you’ve tuned prompts for GPT-4.1, Claude Sonnet will interpret the same prompt with different emphasis, verbosity, and formatting tendencies. The API response will have the same shape, but the content won’t be identical. If your downstream code parses structured output or depends on a specific response style, you need to test that your prompt works acceptably across every model in your fallback chain before relying on it in production.
Reliability — good track record, no SLA
OpenRouter currently reports 100% uptime on the chat API and 99.97% on the data API (status.openrouter.ai). For a relatively young platform, that’s a respectable record.
There is no published SLA.
That last sentence matters more than the uptime numbers. If you have a contractual uptime commitment to your own customers, you cannot delegate it to a vendor with no uptime guarantee. “We happened to be up” is not an SLA. Direct provider APIs from Anthropic and OpenAI also lack explicit SLAs for most tiers, but you’re at least reducing the number of failure points in the chain: one provider’s availability instead of two.
For SLA-critical workloads, going direct is the safer default — not because direct is more reliable, but because OpenRouter’s gateway is an additional dependency, and that dependency has no public uptime commitment. A dual-provider setup with your own routing logic gives you equivalent resilience with one fewer black-box dependency.
Security and key management
OpenRouter does not log request content to your account history by default. It’s SOC-2 compliant and GDPR compliant. You can bring your own provider keys (BYOK) if you want to avoid routing credentials through OpenRouter’s key vault entirely.
GitHub detects committed OpenRouter API keys and alerts you before you notice the breach in logs (OpenRouter is listed in GitHub’s push-protection and user-alert patterns).
The enterprise-relevant detail most teams miss: compliance routing to Bedrock or Vertex AI. When you route Claude requests through a Bedrock or Vertex AI provider on OpenRouter, they don’t go to Anthropic.com — they route to AWS or Google infrastructure instead. This is significant in two directions:
If your compliance requirement is “Claude inference must not touch Anthropic’s consumer infrastructure,” this routing handles that without you setting up your own Bedrock or Vertex integration. For teams that want Claude’s capabilities with cloud-specific data boundaries, that’s a non-trivial engineering shortcut.
If your compliance requirement is “all traffic must flow to [named vendor endpoint]” with an audit trail to that specific endpoint, the traffic still routes through OpenRouter. That may or may not satisfy your compliance team’s interpretation — get that confirmed in writing before committing to this architecture.
Model availability — 400+ models, one API format
OpenRouter gives you access to 400+ models across 60+ providers through a single OpenAI-compatible interface. You write one integration — chat/completions — and get access to Anthropic, Google, Meta, Mistral, Cohere, and dozens of smaller providers without learning each vendor’s SDK or authentication scheme.
Open-source models are a particular strength. Meta’s Llama family and Mistral’s models run through community providers at pricing well below equivalent proprietary models. For workloads where output quality is acceptable from an open-source model, the per-token cost difference is substantial.
The gap: some enterprise and preview models remain direct-only. When a provider launches a new model, there’s typically a lag before OpenRouter routes to it. If you need day-one access to a new model tier, or if a model is available only under an enterprise contract that requires direct provisioning, you’ll go direct regardless of your general preference.
Switching costs
If you’re already using any OpenAI-compatible SDK, OpenRouter adoption is a one-line change — swap the base_url to https://openrouter.ai/api/v1 and update the API key. The interface is the same.
Going the other direction — from OpenRouter back to direct — is equally low-friction. The models array, routing configuration, and provider selection are OpenRouter-specific, but the core chat completions structure is standard. No proprietary format lock-in on either side.
The real switching cost is not the API change. It’s auditing your prompt-to-model dependencies and testing fallback behavior, which you should be doing regardless of which path you choose.
Verdict
Use OpenRouter if:
- You’re running more than two model families, or you evaluate new models frequently enough that a unified interface saves real integration time
- You need automatic failover without building and maintaining routing logic yourself
- You’re spending under $5,000/month — at that volume, the platform fee costs less than the engineering hours to replace what it does
- You want Bedrock or Vertex routing for Claude without setting up cloud infrastructure directly
- Your team is small enough that managing multiple provider keys and dashboards is meaningful overhead
Go direct if:
- You’re single-provider at high volume — the fee compounds with no added value when you’re not using multi-model routing or failover
- You have an SLA-critical workload and OpenRouter’s no-SLA stance is a hard block
- Your compliance requirement specifically names vendor endpoints in a way that a gateway proxy can’t satisfy
- You need provider-native features that OpenRouter’s standard interface doesn’t expose — batch processing, fine-tuned model endpoints, provider-specific parameters
- You’re already at a scale where the infrastructure engineering investment is a smaller cost than the ongoing platform fee
If you’re evaluating self-hosted alternatives alongside OpenRouter — LiteLLM and Portkey being the main ones — Best LLM Router in 2026: OpenRouter, LiteLLM, and Portkey covers the full comparison.
Caveats
Latency numbers in this article come from a single third-party benchmark (opper.ai, April 2026, GPT-4.1 only). OpenRouter’s smart routing behavior varies by model, provider load, and origin geography. If latency is your primary decision criterion, measure your specific workload through both paths.
Pricing figures are from May 2026. Token prices are set by providers and can change. The 5.5% platform fee is set by OpenRouter and can also change. Check current rates before building financial projections around either.
There is no affiliate relationship with OpenRouter, Anthropic, or OpenAI. No commission affects this verdict.
References
- OpenRouter pricing, routing, and security documentation: openrouter.ai
- Opper.ai benchmark, April 2026 (GPT-4.1, 200 calls, direct vs. gateway): opper.ai/blog/llm-router-latency-benchmark-2026
- OpenRouter uptime and incident history: status.openrouter.ai
- Token cost comparison across providers: tokenmix.ai