Try Bifrost Enterprise free for 14 days.
Request access

Claude Code Gateway

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.

  • Cost tracking
  • Model routing
  • Observability
  • Budget controls
  • MCP gateway
  • Failover
Claude Code
Developer's IDE
Base URL
Bifrost Gateway
Routing, cost tracking, observability
Failover routing
Model Providers
Anthropic, Bedrock, Vertex AI

[ QUICK START ]

Set Up the Gateway

Pick the path that fits your workflow.

Prerequisites

Node.js 18+Claude Code installedProvider API key
?
Don't have Claude Code yet? Install it with npm install -g @anthropic-ai/claude-code
1

Start the Bifrost gateway

One command. Bifrost starts with zero configuration on port 8080. Add your provider API key through the Web UI after startup.

Terminal, Tab 1
# Install and run Bifrost gateway
$ npx -y @maximhq/bifrost
OUTPUT
 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
Open http://localhost:8080 and add at least one provider API key before continuing.
2

Launch Bifrost CLI

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.

Terminal, Tab 2
# Launch the interactive CLI
$ npx -y @maximhq/bifrost-cli
INTERACTIVE SETUP
  ┌──────────────────────────────────────┐
  │             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
i
Bifrost CLI automatically installs missing agents via npm if needed.
3

Confirm and go

Review the summary. Press Enter. Claude Code launches with Bifrost routing, MCP tools attached, and every request tracked.

READY TO LAUNCH
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
When launching Claude Code, the CLI automatically registers Bifrost’s MCP server endpoint (/mcp) so all your configured MCP tools are available inside the agent.
4

Tabbed Session UI

After launch, Bifrost CLI keeps you inside a tabbed terminal UI instead of exiting after the first session. The bottom tab bar shows:

The Bifrost CLI label and current CLI version
One tab per running or recent agent session
A status badge for each tab:
🧠- the visible screen is actively changing, so the agent is still working
- the session looks idle and ready
🔔- the PTY emitted a real terminal alert
TABBED SESSION UI
Tip: 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
That's it. Open localhost:8080/workspace/logs you'll see every Claude Code request with model, latency, tokens, and cost in real time.

[ MAKE IT PERMANENT ]

Persist across sessions

Add to your shell config so every terminal session routes through Bifrost.

📄 ~/.zshrc
# ── 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"
Run source ~/.zshrc to apply. For Bash, add to ~/.bashrc.

Ready to Add a Control Layer to Claude Code?

Bifrost is open source and production-ready. Teams get started in minutes and scale without rethinking the architecture.

[ 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 ]

Frequently Asked Questions

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.