One base URL
Keep your OpenAI or Anthropic SDK and change the base URL. The proxy translates the request to the upstream format and translates the response back.
A self-hosted LLM gateway with OpenAI, Anthropic, and Cohere-compatible endpoints, routing, budgets, and an admin console.
LLM Proxy is a self-hosted gateway for LLM APIs. Point an existing OpenAI or Anthropic SDK at it, or a Cohere SDK at the rerank endpoint. The proxy sends each request to the upstream that serves the requested model and translates the response back. Fallback, cost-aware routing, budgets, request logging, and the admin console are built in, and configuration changes do not require a restart.

Client LLM Proxy Upstream
OpenAI / Anthropic / ──▶ authenticate, check allowlists & budgets
Cohere rerank route: mapping, retries, fallback, ──▶ provider API
circuit breaker
◀── translate back to the client's protocolA request can enter as OpenAI Chat Completions and leave as Anthropic Messages, or be forwarded unchanged when both sides use the same protocol. Core Concepts explains the terms.
| Protocol | Endpoint |
|---|---|
| OpenAI Chat Completions | POST /v1/chat/completions |
| OpenAI Responses | POST /v1/responses (retrieve, delete, cancel, input items, compact, SSE and WebSocket) |
| Anthropic Messages | POST /v1/messages (+ POST /v1/messages/count_tokens) |
| Cohere-compatible rerank | POST /v1/rerank (alias POST /v2/rerank) |
| Evaluation | POST /v1/systemone · POST /v1/decisions |
| OpenAI-compatible utilities | /v1/embeddings · /v1/images/generations · /v1/images/edits · /v1/audio/speech · /v1/audio/transcriptions · /v1/audio/translations · /v1/models |
The full route list, auth column, and provider capability matrix are in the Endpoint Index.
auto, fast, or best to let the proxy pick a configured model locally (without calling an LLM) based on complexity, cost, and capability. An optional routing judge handles ambiguous first turns.ECONOMY, BALANCED, and PREMIUM tiers and adapts based on real request outcomes./servers/<name>/mcp with the same API keys, budgets, rate limits, and logs as model traffic. Per-key allowlists and a deny-by-default policy limit process execution and outbound requests.web_search calls from any client are answered through your SearXNG or Ollama backend and returned in the client's format, including Anthropic.admin and viewer roles. Users can have model allowlists, account budgets, and rate limits. Invitations, passkeys, TOTP two-factor, and OIDC are supported.| Section | What is inside |
|---|---|
| Getting Started | Install, first-run setup, connect an SDK or coding agent, concepts |
| Deployment | Docker Compose, databases, reverse proxy, upgrades |
| Admin Console | Every dashboard screen and server setting, explained |
| API Reference | Endpoints, auth, streaming, tools, routing, errors, OpenAPI |
| Guides | Cost control, monitoring, security hardening |
| Reference | Environment variables, FAQ |
MIT. See LICENSE.