Route Claude Code through 1000+ models, track costs per developer, and enforce budgets. Built for enterprises that need visibility at scale without changing developer workflows.
[ QUICK START ]
Pick the path that fits your workflow.
Prerequisites
npm install -g @anthropic-ai/claude-codeOne command. Bifrost starts with zero configuration on port 8080. Add your provider API key through the Web UI after startup.
# Install and run Bifrost gateway $ npx -y @maximhq/bifrost
✓ Bifrost v1.4.5 started ├─ HTTP server listening on http://localhost:8080 ├─ Web UI available at http://localhost:8080 ├─ MCP server endpoint http://localhost:8080/mcp └─ Config store: SQLite ~/.config/bifrost/config.db
In a second terminal. The interactive TUI auto-detects Claude Code, fetches models from your gateway, sets all env vars, and attaches MCP tools.
Learn more about Bifrost CLI here.
# Launch the interactive CLI $ npx -y @maximhq/bifrost-cli
┌──────────────────────────────────────┐ │ BIFROST CLI │ └──────────────────────────────────────┘ Step 1 ─ Base URL → http://localhost:8080 Step 2 ─ Virtual Key (press Enter to skip) Step 3 ─ Choose a Harness ❯ Claude Code v1.0.21 ✓ installed Codex CLI v0.1.0 ✓ installed Gemini CLI not installed Step 4 ─ Select a Model ❯ anthropic/claude-sonnet-4-5-20250929 anthropic/claude-opus-4-5-20251101 openai/gpt-5 gemini/gemini-2.5-pro
Review the summary. Press Enter. Claude Code launches with Bifrost routing, MCP tools attached, and every request tracked.
Ready to launch Base URL http://localhost:8080 Harness Claude Code (2.1.92 (Claude Code)) Model openai/gpt-5 Virtual Key no Worktree no enter launch u url v virtual key w worktree h harness m model d dashboard ✓ Launching Claude Code... ANTHROPIC_BASE_URL=http://localhost:8080/anthropic MCP server registered at /mcp All requests will appear at http://localhost:8080/workspace/logs
After launch, Bifrost CLI keeps you inside a tabbed terminal UI instead of exiting after the first session. The bottom tab bar shows:
Bifrost CLI label and current CLI versionTip: New Try the Codex App with 2x rate limits until April 2nd. Run 'codex ap p' or visit https://chatgpt.com/codex?app-landing-page=true > hi ● Hi! How can I help you today? > hi ● Hello! How can I help you today?Bifrost CLI ✅ 1:Claude Code ✅ 2:Codex CLI 🧠 3:Codex CLI n:new e:edit session x:cl ose h/l:move 1-9:jump Esc:resume v0.10.3
Same as above, launch Bifrost and add at least one provider via the Web UI or config.json.
$ npx -y @maximhq/bifrost
The base URL is always the same. Choose your auth method:
For Claude Pro, Max, Teams, or Enterprise subscribers. No API key needed.
# Point Claude Code at Bifrost $ export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic # Launch, browser opens for OAuth $ claude
/model opus.Send a prompt in Claude Code and check localhost:8080/workspace/logs. You'll see the request with cost, model, and latency.
Request logged Time: 2026-04-06 07:58:21 PM (+05:30) Type: Responses Stream Message: What model are you running on? Provider: AI ANTHROPIC Model: claude-haiku-4-5-20251001 Latency: 3.049ms Tokens: 26,236 (26,050+186) Cost: $0.0335
Register Bifrost's MCP endpoint so Claude Code can access all your centralized tools.
# Without virtual key auth $ claude mcp add bifrost --transport http http://localhost:8080/mcp # With virtual key auth $ claude mcp add-json bifrost \ '{"type":"http","url":"http://localhost:8080/mcp","headers":{"Authorization":"Bearer bf-vk-..."}}'
[ MAKE IT PERMANENT ]
Add to your shell config so every terminal session routes through Bifrost.
# ── Bifrost + Claude Code ── export ANTHROPIC_BASE_URL="http://localhost:8080/anthropic" # Uncomment for API key auth: # export ANTHROPIC_API_KEY="sk-ant-..." # export ANTHROPIC_AUTH_TOKEN="sk-ant-..." # Optional: override default model tiers # export ANTHROPIC_DEFAULT_SONNET_MODEL="anthropic/claude-sonnet-4-5-20250929" # export ANTHROPIC_DEFAULT_OPUS_MODEL="anthropic/claude-opus-4-5-20251101" # export ANTHROPIC_DEFAULT_HAIKU_MODEL="anthropic/claude-haiku-4-5-20251001"
source ~/.zshrc to apply. For Bash, add to ~/.bashrc.[ WHAT'S NEXT ]
You've set up the gateway. Explore the rest of the Claude Code series.
Set up Bifrost as a gateway with model routing, governance controls, and full observability.
Guide 02Route Claude Code to GPT-5 and GPT-5 mini with virtual keys, budgets, and failover.
Guide 03Route Claude Code to Gemini 2.5 Pro and Flash with virtual keys, budgets, and failover.
[ RESOURCES ]
Add governance, guardrails, and MCP controls for production Claude Code deployments.
[ BIFROST FEATURES ]
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 ]
Change just one line of code. Works with OpenAI, Anthropic, Vercel AI SDK, LangChain, and more.
[ FAQ ]
Route Claude Code through Bifrost by setting ANTHROPIC_BASE_URL=http://localhost:8080/anthropic. Every request is logged with model, latency, input/output tokens, and dollar cost. View real-time dashboards at localhost:8080/workspacelogs. For per-developer budgets, create virtual keys in the Bifrost dashboard.
Yes. Bifrost translates Anthropic API requests to other providers automatically. Set ANTHROPIC_DEFAULT_SONNET_MODEL=openai/gpt-5 or gemini/gemini-2.5-pro to swap providers. Switch mid-session with /model openai/gpt-5. Non-Anthropic models must support tool use for Claude Code to function.
Create virtual keys in the Bifrost dashboard under Governance. Each key gets its own budget cap, rate limits, model access rules, and MCP tool permissions. Assign one key per developer. When the budget is exhausted, requests are blocked automatically.
Install Bifrost with npx -y @maximhq/bifrost, then use Bifrost CLI (npx -y @maximhq/bifrost-cli) for zero-config setup, or set ANTHROPIC_BASE_URL manually. All Claude Code traffic routes through Bifrost, giving you observability, cost tracking, model routing, and governance.
Yes. Set CLAUDE_CODE_USE_BEDROCK=1 and ANTHROPIC_BEDROCK_BASE_URL=http://localhost:8080/bedrock. Bifrost handles AWS authentication. Pin model versions with ANTHROPIC_DEFAULT_SONNET_MODEL to avoid resolution issues in your Bedrock account.
Configure MCP servers in Bifrost, then connect Claude Code to the /mcp endpoint. Using Bifrost CLI, this is automatic. For manual setup: claude mcp add bifrost --transport http http://localhost:8080/mcp. Virtual keys control which tools each developer can access.
Not necessarily. Claude Pro or Max subscribers authenticate via browser OAuth, just set ANTHROPIC_BASE_URL and log in. For API key users, use your Anthropic Console key or a Bifrost virtual key for governed access with budgets.