What is Helicone AI Gateway?
Helicone AI Gateway is an open-source proxy, written in Rust, that sits between your application and the large language model providers you call. You send requests using the familiar OpenAI SDK and API format, and the gateway forwards them to OpenAI, Anthropic, Google, AWS Bedrock, and many other providers behind a single endpoint. It sits in the Gateways & Routing category of the Evaluation & Production Ops tools and is open-source, written in Rust and licensed Apache-2.0.
Overview
Helicone AI Gateway is an open-source proxy, written in Rust, that sits between your application and the large language model providers you call. You send requests using the familiar OpenAI SDK and API format, and the gateway forwards them to OpenAI, Anthropic, Google, AWS Bedrock, and many other providers behind a single endpoint.
It is aimed at developers and teams who call several LLM providers and want one integration instead of many. Because it speaks the OpenAI API, you usually only change the base URL and the model name to start routing through it, so existing code keeps working.
As an LLM gateway, it adds the operational layer you normally have to build yourself: smart routing across providers, rate limiting to control spend, response caching, and request tracing through Helicone or OpenTelemetry. You can use the cloud-hosted version or run it on your own infrastructure with npx or Docker.
What it does
- One OpenAI-compatible endpoint that fans out to 100+ models across OpenAI, Anthropic, Google, AWS Bedrock, and 20+ more providers
- Smart routing strategies including latency-based provider selection (P2C + PeakEWMA), weighted distribution, and cost-based routing to the cheapest option
- Rate limiting per user, team, or globally by request count, token usage, or dollar amount to control spend
- Response caching with Redis and S3 backends to cut cost and latency on repeated requests
- Built-in tracing via Helicone plus OpenTelemetry support for logs, metrics, and traces
- Self-host with npx or Docker, or use the cloud-hosted gateway; the Rust binary is small and starts quickly
Getting started
You can call the cloud-hosted gateway with just a base URL change, or run the gateway locally and point your OpenAI client at it.
Use the cloud-hosted gateway
Point the OpenAI SDK at the Helicone AI Gateway base URL and use your Helicone API key. Prefix the model with the provider name.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_HELICONE_API_KEY",
base_url="https://ai-gateway.helicone.ai/ai",
)
completion = client.chat.completions.create(
model="openai/gpt-4o-mini", # or 100+ models
messages=[
{"role": "user", "content": "Hello, how are you?"}
]
)Run the gateway locally
Set your provider API keys in a .env file, then start the gateway. It listens on port 8080 by default.
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
npx @helicone/ai-gateway@latestPoint your client at the local gateway
Use the local base URL; the gateway holds the real provider keys, so the client key can be a placeholder.
from openai import OpenAI
client = OpenAI(
api_key="placeholder-api-key",
base_url="http://localhost:8080/ai",
)
response = client.chat.completions.create(
model="openai/gpt-4o-mini",
messages=[{"role": "user", "content": "Hello!"}]
)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Calling several LLM providers from one codebase without maintaining a separate integration for each
- Adding fallbacks and latency- or cost-based routing so traffic shifts to the fastest or cheapest available model
- Capping LLM spend with per-user, per-team, or global rate limits on requests, tokens, or dollars
- Caching repeated completions and tracing requests to cut cost and debug production LLM traffic
How Helicone AI Gateway compares
Helicone AI Gateway alongside other open-source gateways & routing tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| OmniRoute | ★ 91.4k | A local-first AI gateway that fronts hundreds of model providers with one OpenAI-compatible endpoint, quota-aware auto-fallback, many routing strategies and prompt compression. |
| Free Claude Code | ★ 74.7k | A local proxy that points Claude Code, Codex, Pi, OpenCode, Cline and other agent CLIs at 50 free, paid, subscription or local model providers, with automatic failover and an admin UI. |
| LiteLLM | ★ 64.2k | A Python SDK and proxy server that gives one OpenAI-compatible API to 100+ LLM providers, with cost tracking, budgets, fallbacks, rate limiting, and an admin UI. |
| Kong Gateway | ★ 44.4k | A Lua/NGINX API gateway whose AI Gateway plugins put one universal endpoint in front of OpenAI, Anthropic, Gemini, Bedrock and other providers, with semantic routing, caching and MCP traffic governance. |
| magpie | ★ 43.7k | Menu bar app and local gateway that lets Claude Code, Codex, Gemini CLI and dozens of other coding agents run on any provider's model, with routing groups that fail over across accounts when a quota runs out. |
| 9Router | ★ 33k | Local OpenAI-compatible router for coding CLIs that tracks per-provider quota, falls back from subscription to cheap to free models, and compresses tool results to cut tokens. |
| Experiential | ★ 20.1k | An open-source gateway that puts hosted, BYOK, local and custom models behind one OpenAI-compatible API, with per-identity model and spend limits and routers fitted from your own traces. |
| Helicone AI Gateway | ★ 648 | One OpenAI-compatible endpoint for 100+ LLM providers, with routing, caching, and tracing |
