Best-of list
Best AI API gateways: open-source and hosted LLM routers compared
One API for many AI models: open-source gateways you can run yourself and hosted ones that charge a fee, compared on fees, free tiers and the work you take on.

Our pick
OpenRouter if you want it hosted, LiteLLM or OmniRoute if you would rather self-host
Best hosted gateway
OpenRouter — 500+ models from 80+ providers behind one key. 5.5% platform fee on Standard (8% on Business); free tier is 25+ free models at 50 requests a day.
Best open-source gateway for teams
LiteLLM — Free to self-host, with virtual keys, budgets, spend tracking and fallbacks across 100+ providers. Pin package versions after the March 2026 PyPI incident.
Best free gateway for coding agents
OmniRoute — Free and MIT-licensed, pooling the free tiers of 90+ providers. You run it yourself, and free-tier limits still apply.
How this list works
OmniRoute
OmniRoute is a free, MIT-licensed gateway you self-host: 350+ providers behind one local endpoint, 90+ with free tiers and 50+ free forever, with auto-fallback and token compression. Best for developers and creators who want the most free model access for coding agents and personal projects, and can keep a small server running.
Starting point: Free and open source (MIT). · Free tier: Yes — Entirely free and open source (MIT, github.com/diegosouzapw/OmniRoute).
LiteLLM
LiteLLM is a free, MIT-licensed proxy for 100+ providers with virtual keys, teams, budgets, rate limits, fallbacks and request logging. An Enterprise edition is priced annually by request capacity, never per token. Best for platform teams that need spend control in front of paid provider keys. Pin versions: two PyPI releases were compromised in March 2026.
Starting point: Open source and self-hosted is free forever ($0): 100+ providers behind one OpenAI-compatible API with... · Free tier: Free tier available
Bifrost
Bifrost is Maxim AI's Apache-2.0 gateway built for speed: 23+ providers behind one OpenAI-compatible API, with failover, load balancing and semantic caching, and about 11 microseconds of added overhead at 5,000 requests per second in its own benchmark. Best for high-traffic production apps; clustering, guardrails and the MCP gateway sit in the Enterprise edition, whose price is not published.
Starting point: Open source under Apache 2.0 and free to self-host. · Free tier: Yes — The open-source gateway is free to self-host under Apache 2.0; there is no hosted free plan.
Portkey
Portkey pairs an MIT-licensed open-source gateway with a hosted control panel for logs, guardrails, prompt versions and budgets. The Developer plan is free with 10k recorded logs a month; Production is $49 a month for 100k logs. Best for teams shipping LLM features to production that need observability, not just routing.
Starting point: Developer: free forever, 10k recorded logs/month, 3-day log retention, not for production. · Free tier: Yes — Developer plan is free forever with 10k recorded logs per month and 3-day log retention.
9Router
9Router is a free, MIT-licensed local gateway built for coding tools such as Claude Code, Codex, Cursor and Cline, with tiered fallback from subscription accounts to cheaper and free providers. Best for one developer's machine; review each provider's terms before routing subscription accounts through it.
Starting point: Free and open source under the MIT license; self-hosted through the npm package or source. · Free tier: Yes — The gateway software is free and open source (MIT) when self-hosted.
OpenRouter
OpenRouter is the best-known hosted option: 500+ models from 80+ providers behind one key, with prepaid credits and a 5.5% platform fee on Standard (8% on Business). The free tier gives 25+ free models at 50 requests a day. Best for teams that want zero infrastructure and one bill.
Starting point: Pay-as-you-go with prepaid credits; model prices pass through at list price. · Free tier: Yes — Free tier includes 25+ free models across 4 providers with 50 requests/day.
LLM Gateway
LLM Gateway works both ways: hosted, with 200+ models across 40+ providers, a 5% fee on purchased credits and no fee on your own provider keys; or self-hosted from its AGPLv3 code. Its Smart Routing (September 2026) sends easy prompts to a cheap model and hard ones to a frontier model. Best for OpenRouter users who mostly bring their own keys.
Starting point: Free: $0, 3 zero-cost models (20 requests a minute), 5% platform fee on credit purchases, no platform fee... · Free tier: Yes — Free plan at $0 with no credit card: 3 zero-cost models at 20 requests a minute and 30-day data retention.
Requesty
Requesty is a hosted gateway with 600+ models at the model cost plus 5%, bring-your-own-keys on pay-as-you-go, and EU data residency on every plan. The free plan covers free models only, at 200 requests a day. Best for OpenRouter users who want a slightly lower fee or EU residency.
Starting point: Free: $0, access to free models, 200 requests/day, routing, caching and EU data residency. · Free tier: Yes — Free plan at $0 with access to free models only.
Cloudflare AI Gateway
Cloudflare AI Gateway sits in front of the provider keys you already have, with free caching, rate limiting and analytics on every Cloudflare plan. Optional Unified Billing adds a 5% fee on credits. Best for teams already on Cloudflare that want cost control without a new vendor.
Starting point: Core features (dashboard analytics, caching, rate limiting) are free on all plans. · Free tier: Yes — Core AI Gateway features are free on every Cloudflare plan with a Cloudflare account.
Related infrastructure & deployment
Calculate self-hosted infrastructure costs: AI Website & Hosting Cost Calculator (Hostinger VPS vs cloud droplets for 24/7 gateway uptime), or compare OmniRoute vs OpenRouter, OmniRoute vs LiteLLM and 9Router vs OmniRoute, or see every OpenRouter alternative.
Self-hosting step by step: OmniRoute on a VPS and LiteLLM on a VPS.
Sources
Every claim on this page traces to the official product page of each listed tool. Free-tier details and pricing change often — open the official source before relying on a number.
- OmniRoute — omniroute.online
- OmniRoute — github.com — Omniroute
- LiteLLM — litellm.ai
- LiteLLM — litellm.ai — Pricing
- LiteLLM — github.com — Litellm
- LiteLLM — docs.litellm.ai — Enterprise
- LiteLLM — github.com — 24518
- LiteLLM — docs.litellm.ai — Release_Notes
- Bifrost — getmaxim.ai — Bifrost
- Bifrost — github.com — Bifrost
- Portkey — portkey.ai
- Portkey — portkey.ai — Pricing
- Portkey — github.com — Gateway
- 9Router — 9router.com
- 9Router — github.com — 9Router
- 9Router — github.com — Releases
- OpenRouter — openrouter.ai
- OpenRouter — openrouter.ai — Pricing
- OpenRouter — openrouter.ai — Faq
- OpenRouter — openrouter.ai — Terms
Frequently asked questions
What is an AI API gateway?
Software that routes API requests to many LLM providers through one OpenAI-compatible endpoint, adding fallbacks, spend tracking and key management. Some you host yourself (OmniRoute, LiteLLM, Portkey's open-source gateway, 9Router); others are hosted services (OpenRouter, Requesty, Cloudflare AI Gateway).
What is the best open-source AI gateway?
It depends on the job. OmniRoute for pooling free tiers across 350+ providers; LiteLLM for virtual keys, budgets and spend tracking in a team; Bifrost for low added latency at high traffic; Portkey's gateway when you also want guardrails and its hosted observability; LLM Gateway if you want the same code hosted or self-hosted; 9Router for one local endpoint for coding tools.
Which AI gateway is free?
OmniRoute, LiteLLM, Bifrost, Portkey's open-source gateway, LLM Gateway and 9Router are free to self-host. Cloudflare AI Gateway's core features are free in front of your own provider keys. OpenRouter (50 requests a day), Requesty (200 requests a day) and LLM Gateway (3 zero-cost models at 20 requests a minute) have free hosted plans limited to free models. Model usage itself is billed by each provider unless you stay within their free tiers.
Which hosted gateway has the lowest fee?
Cloudflare AI Gateway and LLM Gateway add no fee when you use your own provider keys. Requesty and LLM Gateway charge 5% (Requesty on top of model cost, LLM Gateway on credit purchases); OpenRouter adds a 5.5% platform fee on Standard and 8% on Business, and bring-your-own-key usage is fee-free up to $25,000 of list-price inference a month, then 5%.
Is a self-hosted gateway hard to run?
Moderate: you handle installation, updates, uptime and, for LiteLLM, a PostgreSQL database. A gateway on a laptop stops when the laptop sleeps, so always-on agents usually run it on a small Linux VPS. Our step-by-step guides cover OmniRoute and LiteLLM on a VPS.
Is LiteLLM safe after the March 2026 supply-chain attack?
On March 24, 2026, PyPI releases 1.82.7 and 1.82.8 of litellm were published with credential-stealing malware and were live for about 40 minutes. The project remains widely used, but self-hosters should pin versions and verify checksums. See the tool profile for the timeline and official advisory links.
Can I use these with Claude Code or Cursor?
Yes. All of them expose OpenAI-compatible APIs, so you point the tool at the gateway's base URL and pick models. OmniRoute and 9Router are built around coding agents; check each project's docs for the current setup flow.


