5.7 KiB
Bifrost Gateway
Bifrost Gateway is a blazing-fast HTTP API that unifies access to 15+ AI providers (OpenAI, Anthropic, AWS Bedrock, Google Vertex, and more) through a single OpenAI-compatible interface. Deploy in seconds with zero configuration and get automatic fallbacks, semantic caching, tool calling, and enterprise-grade features.
Complete Documentation: https://docs.getbifrost.ai
Quick Start
Installation
Choose your preferred method:
NPX (Recommended)
# Install and run locally
npx -y @maximhq/bifrost
# Open web interface at http://localhost:8080
Docker
# Pull and run Bifrost Gateway
docker pull maximhq/bifrost
docker run -p 8080:8080 maximhq/bifrost
# For persistent configuration
docker run -p 8080:8080 -v $(pwd)/data:/app/data maximhq/bifrost
Configuration
Bifrost starts with zero configuration needed. Configure providers through the built-in web UI at http://localhost:8080 or via API:
# Add OpenAI provider via API
curl -X POST http://localhost:8080/api/providers \
-H "Content-Type: application/json" \
-d '{
"provider": "openai",
"keys": [{"value": "sk-your-openai-key", "models": ["gpt-4o-mini"], "weight": 1.0}]
}'
For file-based configuration, create config.json in your app directory:
{
"providers": {
"openai": {
"keys": [{"value": "env.OPENAI_API_KEY", "models": ["gpt-4o-mini"], "weight": 1.0}]
}
}
}
Your First API Call
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, Bifrost!"}]
}'
That's it! You now have a unified AI gateway running locally.
Key Features
Bifrost Gateway provides enterprise-grade AI infrastructure with these core capabilities:
Core Features
- Unified Interface - Single OpenAI-compatible API for all providers
- Multi-Provider Support - OpenAI, Anthropic, AWS Bedrock, Google Vertex, Cerebras, Azure, Cohere, Mistral, Ollama, Groq, and more
- Drop-in Replacement - Replace OpenAI/Anthropic/GenAI SDKs with zero code changes
- Automatic Fallbacks - Seamless failover between providers and models
- Streaming Support - Real-time response streaming for all providers
Advanced Features
- Model Context Protocol (MCP) - Enable AI models to use external tools (filesystem, web search, databases)
- Semantic Caching - Intelligent response caching based on semantic similarity
- Load Balancing - Distribute requests across multiple API keys and providers
- Governance & Budget Management - Usage tracking, rate limiting, and cost control
- Custom Plugins - Extensible middleware for analytics, monitoring, and custom logic
Enterprise Features
- Clustering - Multi-node deployment with shared state
- SSO Integration - Google, GitHub authentication
- Vault Support - Secure API key management
- Custom Analytics - Detailed usage insights and monitoring
- In-VPC Deployments - Private cloud deployment options
Learn More: Complete Feature Documentation
SDK Integrations
Replace your existing SDK base URLs to unlock Bifrost's features instantly:
OpenAI SDK
import openai
client = openai.OpenAI(
base_url="http://localhost:8080/openai",
api_key="dummy" # Handled by Bifrost
)
Anthropic SDK
import anthropic
client = anthropic.Anthropic(
base_url="http://localhost:8080/anthropic",
api_key="dummy" # Handled by Bifrost
)
Google GenAI SDK
import google.generativeai as genai
genai.configure(
transport="rest",
api_endpoint="http://localhost:8080/genai",
api_key="dummy" # Handled by Bifrost
)
Complete Integration Guides: SDK Integrations
Documentation
Getting Started
- Quick Setup Guide - Detailed installation and configuration
- Provider Configuration - Connect multiple AI providers
- Integration Guide - SDK replacements
Advanced Topics
- MCP Tool Calling - External tool integration
- Semantic Caching - Intelligent response caching
- Fallbacks & Load Balancing - Reliability and scaling
- Budget Management - Cost control and governance
Browse All Documentation: https://docs.getbifrost.ai
Built with ❤️ by Maxim