Try Bifrost Enterprise free for 14 days.
Request access
[ LLM GATEWAY ]

Enterprise LLM gateway
to route, secure and govern all AI

One LLM gateway that unifies access to 10,000+ models, with full control over cost, policy and compliance.

Open Source: Self-Hosted | VPC | Air-Gapped

One gateway between your apps and every provider

Gemini
Claude
Cursor
ChatGPT
Perplexity
VS Code
OpenClaw
DeepSeek
Bifrost

Edge + Gateway

Route
Govern
Secure
Anthropic
OpenAI
Google
Azure
AWS
Mistral
GitHub
Notion
Run the gateway locally
npx -y @maximhq/bifrost

Performance at a Glance

11µs Added Overhead

Sustained at 5,000 RPS

5,000 Requests / Sec

100% success rate

10,000+ Models

Across 25+ providers

99.99% Availability

Fallbacks + load balancing

[ OVER 1,000+ TEAMS USE BIFROST ]

[ PROVIDERS AND MODELS ]

Connect 10,000+ models through one OpenAI-compatible API

Configure providers once and Bifrost handles routing, failover, and load balancing across them.

OpenAI logoAnthropic logoAWS Bedrock logoGoogle Vertex AI logoAzure OpenAI logoGoogle Gemini logoGroq logoMistral logoCohere logoCerebras logoDeepSeek logoOllama logoHugging Face logoOpenRouter logoPerplexity logoElevenLabs logoxAI logoOpenAI logoAnthropic logoAWS Bedrock logoGoogle Vertex AI logoAzure OpenAI logoGoogle Gemini logoGroq logoMistral logoCohere logoCerebras logoDeepSeek logoOllama logoHugging Face logoOpenRouter logoPerplexity logoElevenLabs logoxAI logoOpenAI logoAnthropic logoAWS Bedrock logoGoogle Vertex AI logoAzure OpenAI logoGoogle Gemini logoGroq logoMistral logoCohere logoCerebras logoDeepSeek logoOllama logoHugging Face logoOpenRouter logoPerplexity logoElevenLabs logoxAI logo

Drop-in compatible SDKs

OpenAI SDKAnthropic SDKAWS Bedrock SDKGoogle GenAI SDKLiteLLMLangChainPydanticAI

[ GATEWAY CAPABILITIES ]

Enterprise LLM gateway features

Route, cache, monitor, and govern every model call from a single layer that adds 11µs of overhead.

Route requests across 10,000+ models with one unified API

  • Route through OpenAI, Anthropic, Gemini, Groq, Mistral, and 25+ providers across 10,000+ models
  • Run chat completions, embeddings, images, audio, and rerank from one unified interface
  • Store and rotate every provider key from one place
  • Add custom providers and alias models to your own naming scheme
Provider configuration →
[ ONE SDK ]/v1/chat/v1/embeddings/v1/audio/v1/rerank[ PROVIDERS ]OpenAIAnthropicGeminiGroqMistral+ 15 MOREBIFROST ROUTERACTIVEALIASfast-chat → gpt-4oKEYsk-•••4f2c[ ONE INTERFACE · 25+ PROVIDERS · 10,000+ MODELS ]

Stay online with automatic LLM fallbacks and load balancing

  • Retry with exponential backoff and rotate keys on 429 Too Many Requests and auth errors
  • Automatically fallback to the next provider when the primary provider fails
  • Optimize traffic distribution across providers and keys with Adaptive Load Balancing
Fallbacks & load balancing →
TRAFFIC DISTRIBUTIONREBALANCING
gpt-4o
p95 1.1s429
claude
p95 1.3s
llama-3
p95 0.9s
WEIGHTS · 500msBACKOFF ×20% ERR

[ FAILOVER IN 240ms · ZERO DROPPED REQUESTS ]

Cut LLM costs with semantic caching and smart model routing

  • Cache AI responses with exact-match hashing and semantic similarity search
  • Cut MCP tool token costs by up to 92% and latency by 40% with Code Mode
  • Score each request and send simple ones to smaller, cheaper models with Complexity Router
Semantic caching docs →
Spend Meter
Live
OPENAI · GPT-4O$620
ANTHROPIC · CLAUDE$410
TEAM · GROWTH$780
78%
of daily cap
NEAR LIMIT

LLM observability on every request

  • Track cost, tokens, latency, and model usage per AI request in the built-in dashboard
  • Export native Prometheus metrics and OpenTelemetry traces to Grafana, New Relic, Honeycomb, or Datadog
  • Ship request logs to S3, GCS, BigQuery, Kafka, or Pub/Sub on a schedule
Observability docs →
PER-TOOL METRICS
LIVE · 24h
TOTAL SPEND
$1,284
tool + LLM tokens
P95 LATENCY
142ms
per tool call
TOOL CALLS
38.4K
across 12 servers
LATENCY ms
now
SPEND ATTRIBUTED BY TEAM · CUSTOMERtool · server · vk
team-platform 42%team-growth 31%acme-corp 18%other 9%
STREAM TRACES + METRICS
GrafanaDatadogBigQuery

Govern LLM access and spend with virtual keys and budgets

  • Issue virtual keys that scope which providers, models, and MCP tools each consumer can reach
  • Define access profiles once so new users are governed from day one
  • Bundle MCP tools into groups so agents cannot call what you did not approve
  • Set budgets and rate limits at the key, team, and customer level
Virtual keys docs →
[ KEYS ]
vk · paymentsACTIVE
openaigpt-4omcp:github
vk · researchACTIVE
anthropicclaudemcp:jira
vk · supportACTIVEREVOKED
azuregpt-4o-mini

Govern MCP tool calls from the same gateway

  • Govern tool access with allow-lists at the tool level, not just per server
  • Audit every tool call with tool, server, virtual key, and parent request
  • Track cost and latency per tool call alongside LLM spend
  • Build virtual MCP servers as curated toolkits per team or customer
  • Authenticate every MCP server with OAuth 2.0, headers, or per-user credentials
MCP gateway docs →
github-mcp
24 tools
stripe-mcp
12 tools
postgres-mcp
18 tools
slack-mcp
9 tools
VIRTUAL SERVERCURATED
support-suite
• repo.read← github-mcp
• refund.read← stripe-mcp
• query.read← postgres-mcp
• msg.post← slack-mcp
vk_support_9fexposes 4 / 63
gw.bifrost.ai/v/support-suite
[ ONE URL · AUTO-DISCOVER ALL TOOLS ]

Secure every request with LLM guardrails and PII redaction

  • Validate inputs and outputs against AWS Bedrock Guardrails, Azure Content Safety, Gray Swan Cygnal, or Patronus AI
  • Define custom policies with CEL rules on model, role, or content
  • Run native secrets and regex checks without an outbound call
  • Detect and redact PII and secrets before they reach a provider
Guardrails docs →
CONTENT SAFETY
SCORING
BLOCKED
THRESHOLD
hate
violence
self-harm
sexual
[ SEVERITY THRESHOLD: MEDIUM ]

[ DROP-IN REPLACEMENT ]

Switch to the LLM gateway with one line of code

Bifrost exposes 100% compatible endpoints for the SDKs you already use. Point the base URL at the gateway and every feature above turns on.

Step 01

Run the gateway

Start Bifrost as a single binary with npx or Docker. No additional dependencies needed.

shell
npx -y @maximhq/bifrost
# or
docker run -p 8080:8080 maximhq/bifrost
Step 02

Point your SDK at it

Change the base URL to the gateway and keep your existing code. Provider keys are held by Bifrost, not your app.

python
# Before
client = openai.OpenAI(api_key="your-openai-key")

# After
client = openai.OpenAI(
    base_url="http://localhost:8080/openai",
    api_key="dummy-key",  # keys are held by the gateway
)
Step 03

Add a fallback chain

Declare a fallback and Bifrost fails over automatically when the primary provider errors out.

curl
curl -X POST http://localhost:8080/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [{"role": "user", "content": "Hello"}],
    "fallbacks": ["anthropic/claude-3-5-sonnet-20241022"]
  }'

The same base URL works for Claude Code, Cursor, Codex, and Gemini CLI, so coding-agent traffic is routed, logged, and governed like every other AI request.

[ USE CASES ]

LLM gateway use cases for enterprise teams

Keep AI features online during provider outages

Fail over between providers so an OpenAI or Anthropic outage never reaches your users.

Route AI agents through one control point

An AI agent gateway gives agent frameworks a single endpoint for models and MCP tools, with tool allow-lists per key.

Control LLM spend across teams

Give every team its own virtual key with a budget, and attribute cost per key, model, and provider.

Govern coding agents

Point Claude Code, Cursor, Codex, or Gemini CLI at the gateway so developer AI usage is logged, budgeted, and policy-checked like everything else.

Compare and migrate models without code changes

Swap models behind a stable API to A/B quality and cost without touching application code.

Cut repeat inference cost

Cache stable prompts and paraphrases so high-volume endpoints stop paying for the same answer twice.

[ DEPLOY ANYWHERE ]

Deploy the LLM gateway in your VPC or air-gapped network

Run native or third-party guardrails inside your own network, so sensitive data never leaves your environment.

Keep keys and data in your environment

  • Store every provider credential inside the gateway, never in client code
  • Keep all request data within your own infrastructure
  • Rotate provider keys without touching a single application
Provider configuration →

Deploy anywhere, including air-gapped

  • Run fully in your VPC or air-gapped private network
  • Deploy with no external dependencies or outbound calls
  • Self-host under Apache 2.0, or run fully managed
Deployment guides →

Meet enterprise compliance standards

  • Comply with SOC 2 Type II, HIPAA, GDPR, and ISO 27001
  • Maintain audit-ready records across every request
  • Enforce one consistent policy across teams and providers
Audit logs docs →

[ COMPLIANCE FRAMEWORKS ]

Built for regulatory compliance

Immutable audit trails and exportable logs across every request, for SOC 2, HIPAA, GDPR, and ISO 27001.

AICPA SOC
GDPR
ISO 27001
HIPAA

Route every AI request through Bifrost

Unify 25+ providers and 10,000+ models behind one open source LLM Gateway you can run in your own VPC, with full control over cost, policy, and compliance.

[ BIFROST FEATURES ]

Open Source & Enterprise

Everything you need to run AI in production, from free open source to enterprise-grade features.

01 Governance

SAML support for SSO and Role-based access control and policy enforcement for team collaboration.

02 Adaptive Load Balancing

Automatically optimizes traffic distribution across provider keys and models based on real-time performance metrics.

03 Cluster Mode

High availability deployment with automatic failover and load balancing. Peer-to-peer clustering where every instance is equal.

04 Alerts

Real-time notifications for budget limits, failures, and performance issues on Email, Slack, PagerDuty, Teams, Webhook and more.

05 Log Exports

Export and analyze request logs, traces, and telemetry data from Bifrost with enterprise-grade data export capabilities for compliance, monitoring, and analytics.

06 Audit Logs

Comprehensive logging and audit trails for compliance and debugging.

07 Vault Support

Secure API key management with HashiCorp Vault, AWS Secrets Manager, Google Secret Manager, and Azure Key Vault integration.

08 VPC Deployment

Deploy Bifrost within your private cloud infrastructure with VPC isolation, custom networking, and enhanced security controls.

09 Guardrails

Automatically detect and block unsafe model outputs with real-time policy enforcement and content moderation across all agents.

[ SHIP RELIABLE AI ]

Try Bifrost Enterprise with a 14-day Free Trial

[quick setup]

Drop-in replacement for any AI SDK

Change just one line of code. Works with OpenAI, Anthropic, Vercel AI SDK, LangChain, and more.

1import os
2from anthropic import Anthropic
3
4anthropic = Anthropic(
5 api_key=os.environ.get("ANTHROPIC_API_KEY"),
6 base_url="https://<bifrost_url>/anthropic",
7)
8
9message = anthropic.messages.create(
10 model="claude-3-5-sonnet-20241022",
11 max_tokens=1024,
12 messages=[
13 {"role": "user", "content": "Hello, Claude"}
14 ]
15)
Drop in once, run everywhere.

[ FAQ ]

LLM Gateway FAQs

Common questions about running an open source LLM Gateway in production.

An LLM gateway is a control layer between your applications and LLM providers. Every request passes through it, so routing, failover, caching, budgets, guardrails and logging apply in one place instead of in every app.

Without a gateway, every application holds its own provider keys and handles outages, costs and security on its own. An enterprise LLM gateway unifies access to every provider through one API. It centralises keys, enforces budgets and guardrails, and records every request for cost and compliance reporting.

An LLM proxy forwards requests to a provider. An LLM gateway also understands and controls them: it routes across providers, fails over on errors, caches responses, enforces budgets and guardrails, and logs every request with its cost and latency.

The terms are often used interchangeably. An LLM gateway focuses on traffic to language models, while an AI gateway can also cover tools and agents. Bifrost does both, governing model requests and MCP tool calls from one gateway.

An API gateway manages general HTTP traffic. An LLM gateway is built for model traffic. It understands providers, models and tokens, so it can route between models, cache semantically similar prompts, track token costs and apply AI guardrails.

Bifrost supports 25+ providers and 10,000+ models, including OpenAI, Anthropic, Gemini, Groq and Mistral. It covers chat completions, embeddings, images, audio and rerank. You can also add custom providers and model aliases.

Yes. Bifrost exposes 100% compatible endpoints for OpenAI, Anthropic, Vercel AI SDK, LangChain and more. Change the base URL to the gateway and keep the rest of your code.

Bifrost caches responses using exact-match hashing and semantic similarity search. Repeated and paraphrased prompts are answered from the cache instead of calling the provider again, which cuts both cost and latency on high-volume endpoints.

Bifrost retries with exponential backoff, rotates keys on rate-limit and authentication errors, and falls back to the next provider when the primary one fails.

Bifrost adds 11µs of overhead per request.

Yes. Bifrost runs entirely inside your VPC or an air-gapped network, with no external dependencies or outbound calls, so keys and request data never leave your infrastructure.

Yes. Bifrost's core gateway is open source under the Apache 2.0 license, and you can self-host it from GitHub. The enterprise version adds SSO, role-based access control, audit logs, vault support, clustering, adaptive routing and more.