What it does
AI Gateway sits between an app and the AI services it uses. Instead of connecting to each provider separately, the app talks to the gateway, which passes requests on to the chosen model. Its makers say it can reach well over a thousand models.
It can retry failed requests, switch to a backup model when one is down, and spread traffic across several models. It also offers guardrails, rules that check what goes into and comes out of a model and can block certain content.
It can also manage MCP servers, the connectors that give AI tools access to other software. A free open-source version runs on your own machine, and the company also offers a hosted and an enterprise version.
Who it's for
Developers and teams running apps that rely on one or more AI providers and want them to stay reliable.
Can I use it without coding?
Developers only. It starts with one command, but you connect to it from your own code. New to this? Start here.
Can I run it?
- Cost
- Free, with optional paid extrasThe open-source version is free; the makers also sell a hosted or pro version.
- Runs on
- Server, Cloud
- Computer
- An ordinary computer is fine
- Privacy
- Sends what you give it to an online service
- API key
- Needed. An API key is a password-like code from an online AI service. What's that?
Try it
- Install Node.js, then start the gateway on your computer using the one-line command in the README.
- Point your app at the gateway's local address and add the API key for the AI provider you want to use.
- Open the gateway's built-in console in your browser to see a log of requests.
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
- Only download from the official GitHub page. Copies with similar names exist for many popular projects.
- License (MIT): Very permissive: free to use, change and share, including for business.
- Keep your API key private. Never paste it into websites or share it, and set a spending limit with the AI service.
- What you type or upload is sent to an online service. Avoid sharing private or sensitive information.
- More on staying safe
Where people are talking about it
- Show HN: An open-source AI Gateway with integrated guardrailsHacker News · Aug 2024
- Show HN: A lightweight AI gateway to 100+ models, in TSHacker News · Jan 2024