---
title: Using Bedrock, Vertex, Gemini, and Anthropic AI Models Through Bifrost
description: "Route AWS Bedrock, Google Vertex AI, Gemini, and Anthropic through one OpenAI-compatible API with Bifrost. Unified auth, failover, and governance.\n\nEnterprise AI teams rarely run a single model from a single provider. A typical production stack pulls Claude from AWS Bedrock for one set of workloads, Gemini from Google"
image: https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/2026/07/ChatGPT-Image-May-25--2026--10_00_08-AM.optimized.png
---

Try Bifrost Enterprise free for 14 days. [Request access](https://www.getmaxim.ai/#enterprise-trial)

*Route AWS Bedrock, Google Vertex AI, Gemini, and Anthropic through one OpenAI-compatible API with Bifrost. Unified auth, failover, and governance.*

Enterprise AI teams rarely run a single model from a single provider. A typical production stack pulls Claude from AWS Bedrock for one set of workloads, Gemini from Google Vertex AI for another, the native Anthropic API for direct features like prompt caching, and the Google Gemini API for low-latency consumer endpoints. Each provider speaks a different protocol, demands a different authentication scheme, and exposes a different SDK. Bifrost solves this by giving you one OpenAI-compatible endpoint that handles AWS Bedrock, Google Vertex AI, Google Gemini, and Anthropic together, with built-in failover, load balancing, and governance.

Bifrost is the open-source [AI gateway](https://www.getmaxim.ai/articles/top-5-llm-gateways-in-2026-a-production-ready-comparison/) by Maxim AI. It adds 11 microseconds of overhead per request at 5,000 requests per second and supports 20+ LLM providers through a single API. This guide walks through why teams consolidate Bedrock, Vertex, Gemini, and Anthropic behind Bifrost, how to configure each provider, and how to use Bifrost's routing layer to make multi-provider workloads reliable.

## Why teams run Claude and Gemini across multiple clouds

Anthropic distributes [Claude through AWS Bedrock](https://docs.anthropic.com/en/api/claude-on-amazon-bedrock), [Google Vertex AI](https://docs.anthropic.com/en/api/claude-on-vertex-ai), and its own native API. Google offers Gemini through both the [direct Gemini API](https://ai.google.dev/gemini-api/docs) and Vertex AI. The reason enterprises end up on more than one of these surfaces is procurement, latency, and capability:

- AWS Bedrock is the natural choice for teams with existing AWS contracts, governance through AWS Organizations, and data residency requirements that map to AWS regions.
- Google Vertex AI is preferred by teams already on Google Cloud, or those who want Gemini, Claude, and third-party models from the same control plane.
- The Anthropic direct API exposes features like prompt caching and the newest beta headers that may land on Bedrock and Vertex weeks or months later.
- The Gemini API offers the lowest-latency direct path to Gemini models and a generous free tier for prototyping.

Once production traffic grows, teams almost always end up using more than one of these. The cost of running each one with its native SDK then becomes the real problem.

## The cost of managing four providers separately

Without a gateway, every provider brings its own dependencies and code paths:

- **Different SDKs**: `boto3` for Bedrock, the Google Cloud SDK for Vertex, `google-genai` for Gemini, and the Anthropic SDK for the direct API.
- **Different authentication**: IAM credentials and SigV4 for Bedrock, OAuth2 service accounts for Vertex, an API key for Gemini, and a bearer token for Anthropic.
- **Different request shapes**: Bedrock's Converse API differs from Anthropic's Messages API, which differs from Vertex's `generateContent` endpoint.
- **No shared failover**: If Bedrock's Claude endpoint rate limits, your code has to know how to switch to Anthropic's direct API as a backup.
- **Fragmented cost tracking**: Each provider reports usage separately, making cost allocation across teams or customers difficult.

Production AI systems routing requests across OpenAI, Anthropic, Google Vertex AI, and AWS Bedrock cannot be managed reliably with direct API calls and handwritten retry logic. This is the problem Bifrost is built to solve.

## How Bifrost unifies Bedrock, Vertex, Gemini, and Anthropic

Bifrost sits between your application and the four providers, exposing a single OpenAI-compatible endpoint. Your application code calls Bifrost; Bifrost handles protocol translation, authentication, and routing to the underlying provider. This is the [drop-in replacement](https://docs.getbifrost.ai/features/drop-in-replacement) model: change only the base URL in your existing OpenAI, Anthropic, Bedrock, or Google SDK and your code keeps working.

What this gives you:

- One endpoint for all four providers, plus 16+ others.
- One configuration surface for keys, regions, projects, and IAM roles.
- A single OpenAI server-sent-event stream format regardless of the underlying provider.
- Built-in routing rules that target requests by model name, virtual key, or weighted strategy.
- Shared observability, governance, and guardrails across every provider.

Targeting a specific provider is done with the `provider/model` syntax. `bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0` routes to Claude on Bedrock. `vertex/gemini-2.5-flash` routes to Gemini on Vertex. `gemini/gemini-2.5-pro` routes to the direct Gemini API. `anthropic/claude-sonnet-4-20250514` routes to the native Anthropic API.

## Configuring each provider in Bifrost

You can configure providers through the Bifrost web UI, the API, a `config.json` file, or the Go SDK. The patterns below show the configuration shape; full details are in the docs.

### AWS Bedrock

Bifrost's [AWS Bedrock provider](https://docs.getbifrost.ai/providers/supported-providers/bedrock) supports static IAM credentials, IRSA on EKS, EC2 instance profiles, and `AWS_ACCESS_KEY_ID` environment variables. It also supports assuming an IAM role with an external ID and session name, which is the standard pattern for cross-account Bedrock access.

```json
{
  "providers": {
    "bedrock": {
      "keys": [{
        "models": ["*"],
        "weight": 1.0,
        "aliases": {
          "claude-3-5-sonnet": "us.anthropic.claude-3-5-sonnet-20241022-v2:0"
        },
        "bedrock_key_config": {
          "region": "us-east-1",
          "role_arn": "env.AWS_ROLE_ARN",
          "external_id": "env.AWS_EXTERNAL_ID"
        }
      }]
    }
  }
}
```

Leaving the access key and secret key empty causes Bifrost to use the AWS default credential chain, which resolves IRSA, ECS task roles, EC2 instance profiles, environment variables, and shared credential files in sequence.

### Google Vertex AI

Bifrost's [Google Vertex AI provider](https://docs.getbifrost.ai/providers/supported-providers/vertex) gives access to Gemini, Claude, and third-party models through Google Cloud. Bifrost detects the model family automatically (Gemini versus Anthropic) and applies the correct conversion logic. Vertex supports three authentication methods: service account JSON, Application Default Credentials (recommended for GKE Workload Identity), and an API key for Gemini-only access.

```json
{
  "providers": {
    "vertex": {
      "keys": [{
        "models": ["*"],
        "weight": 1.0,
        "vertex_key_config": {
          "project_id": "env.VERTEX_PROJECT_ID",
          "region": "us-central1",
          "auth_credentials": "env.VERTEX_CREDENTIALS"
        }
      }]
    }
  }
}
```

Bifrost handles OAuth2 token caching and refresh automatically. For Claude models on Vertex, the `anthropic_version` header is set to `vertex-2023-10-16` and unsupported beta headers are stripped from the request before forwarding.

### Google Gemini

The [Gemini provider](https://docs.getbifrost.ai/providers/supported-providers/gemini) uses a simple API key from Google AI Studio. This path is useful when you do not need the project, region, and IAM machinery of Vertex.

```json
{
  "providers": {
    "gemini": {
      "keys": [{
        "value": "env.GEMINI_API_KEY",
        "models": ["gemini-2.5-flash", "gemini-2.5-pro"],
        "weight": 1.0
      }]
    }
  }
}
```

Bifrost converts Gemini's native streaming format into the standard OpenAI server-sent-event shape your client expects, so the same request body that works against `bedrock/...` works against `gemini/...` with no client changes.

### Anthropic

The [Anthropic provider](https://docs.getbifrost.ai/providers/supported-providers/anthropic) hits Anthropic's native API directly. This is the right surface when you need the newest Claude features, prompt caching, or beta headers before they propagate to Bedrock or Vertex.

```json
{
  "providers": {
    "anthropic": {
      "keys": [{
        "value": "env.ANTHROPIC_API_KEY",
        "models": ["claude-sonnet-4-20250514", "claude-opus-4-20250514"],
        "weight": 1.0
      }]
    }
  }
}
```

With all four providers configured, the same OpenAI-compatible request can target any of them by changing the model field. Your application code stays unchanged.

## Routing, failover, and load balancing across providers

Once Bedrock, Vertex, Gemini, and Anthropic are all behind Bifrost, you can compose them into reliability and cost strategies that would otherwise require custom code:

- **Automatic failover**: Use Bifrost's [retries and fallbacks](https://docs.getbifrost.ai/features/retries-and-fallbacks) to declare a primary and a fallback chain. If Bedrock's Claude endpoint returns a 429 or 5xx, Bifrost can fail over to Claude on Vertex, then to the native Anthropic API, without your application doing anything.
- **Weighted load balancing**: Use [keys and load balancing](https://docs.getbifrost.ai/features/keys-management) to split traffic across providers by weight. For example, send 70% of Claude traffic to Bedrock and 30% to Vertex during a phased migration.
- **Cost-aware routing**: Send cheaper or latency-sensitive requests to Gemini while keeping high-stakes reasoning calls on Claude.
- **Region-aware routing**: Pin EU traffic to Vertex in `eu-west1` and US traffic to Bedrock in `us-east-1` while keeping the same application code.

Routing happens at the gateway, so application teams do not have to think about provider availability or failure modes.

## Governance and observability for multi-provider workloads

Running Bedrock, Vertex, Gemini, and Anthropic behind a single gateway also collapses the operational surface into one control plane. Bifrost provides:

- **Virtual keys, budgets, and rate limits**: Issue per-team or per-customer virtual keys with their own spend caps and rate limits, regardless of which provider serves the request.
- **Unified observability**: Native [Prometheus and OpenTelemetry](https://docs.getbifrost.ai/features/observability) exporters publish request-level metrics, distributed traces, and cost data across every provider.
- **Guardrails**: Apply content safety policies through AWS Bedrock Guardrails, Azure Content Safety, or Patronus AI uniformly across all upstream providers.
- **Audit logs**: Immutable trails of every request, including provider, model, latency, tokens, and cost, support SOC 2, GDPR, HIPAA, and ISO 27001 compliance reporting.

For teams running [Bifrost for AWS Bedrock](https://www.getmaxim.ai/resources/aws-bedrock) inside their own VPC, all of this happens without traffic leaving the customer's AWS account.

## Start using Bedrock, Vertex, Gemini, and Anthropic with Bifrost

Pulling Bedrock, Vertex, Gemini, and Anthropic behind Bifrost replaces four SDKs, four authentication systems, and four sets of failure handling with one OpenAI-compatible endpoint. The gateway handles protocol translation, OAuth2 and IAM credentials, streaming normalization, and routing, so application teams ship features against a single API while platform teams keep full control over governance and cost.

To see how Bifrost can simplify your multi-provider AI infrastructure, [book a demo](https://www.getmaxim.ai/book-a-demo) with the Bifrost team.

## Read next

[![OpenClaw vs Hermes: Which Agent to Run and How to Control It](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/10/openclaw-vs-hermes-which-agent-to-run-and-how-to-control-it-bifrost-1920x1080.png) OpenClaw and Hermes Agent are open-source, self-hosted AI agents that run on your own hardware and reach you through chat apps. This openclaw vs hermes guide compares how each is built and secured, says which to run for which job, and shows how to cap its models, spend, and MCP tools.](https://www.getmaxim.ai/articles/openclaw-vs-hermes-which-agent-to-run-and-how-to-control-it/)

[![AnythingLLM With Every Model: Connect and Govern It Through One Gateway](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/10/anythingllm-with-every-model-connect-and-govern-it-through-o-bifrost-1920x1080.png) AnythingLLM is an open-source AI application for document chat, agents, and team workspaces. This guide shows how to route AnythingLLM through Bifrost so every workspace reaches any model through one endpoint, with budgets, rate limits, failover, and request logs.](https://www.getmaxim.ai/articles/anythingllm-with-every-model-connect-and-govern-it-through-one-gateway/)

[![OWASP LLM Top 10: How to Cover Each Risk at the Gateway](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/10/owasp-llm-top-10-how-to-cover-each-risk-at-the-gateway-bifrost-1920x1080.png) The OWASP LLM Top 10 ranks the ten most critical security risks in applications built on large language models. This guide walks each 2026 risk, from prompt injection to unbounded consumption, and shows what an AI gateway such as Bifrost can enforce and where other controls are required.](https://www.getmaxim.ai/articles/owasp-llm-top-10-how-to-cover-each-risk-at-the-gateway/)

## More in AI Gateway

[![Managing Virtual Keys and Budgets in Bifrost: A Complete Guide](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/07/ChatGPT-Image-May-25--2026--09_57_27-AM.optimized.png) Learn how virtual keys and budgets in Bifrost give platform teams hierarchical cost control, rate limits, and access governance across every LLM provider. Enterprise AI spending is now the fastest-growing line item in most engineering budgets, but the controls around it have not caught up. Gartner forecasts global AI](https://www.getmaxim.ai/articles/managing-virtual-keys-and-budgets-in-bifrost-a-complete-guide/)

[![Top 5 Semantic Routing Platforms for LLM Applications](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/07/-Top-5-Semantic-Routing-Platforms-for-LLM-Applications.optimized.png) Compare the top 5 semantic routing platforms for production LLM applications on intent classification, semantic caching, and multi-provider support. Semantic routing platforms have become essential infrastructure for any team running large language models at production scale. Sending every prompt to a single frontier model is expensive, slow, and unnecessary:](https://www.getmaxim.ai/articles/top-5-semantic-routing-platforms-for-llm-applications/)

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "publisher": {
        "@type": "Organization",
        "name": "Maxim Articles",
        "url": "https://www.getmaxim.ai/articles/",
        "logo": {
            "@type": "ImageObject",
            "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w256h256/2025/08/thumbnail.png",
            "width": 60,
            "height": 60
        }
    },
    "author": {
        "@type": "Person",
        "name": "Kuldeep Paul",
        "image": {
            "@type": "ImageObject",
            "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/2025/08/1727978381919.jpeg",
            "width": 800,
            "height": 800
        },
        "url": "https://www.getmaxim.ai/articles/author/kuldeep/",
        "sameAs": []
    },
    "headline": "Using Bedrock, Vertex, Gemini, and Anthropic AI Models Through Bifrost",
    "url": "https://www.getmaxim.ai/articles/using-bedrock-vertex-gemini-and-anthropic-ai-models-through-bifrost/",
    "datePublished": "2026-05-22T04:30:00.000Z",
    "dateModified": "2026-10-13T11:02:49.000Z",
    "image": {
        "@type": "ImageObject",
        "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w1200/2026/07/ChatGPT-Image-May-25--2026--10_00_08-AM.optimized.png",
        "width": 1200,
        "height": 800
    },
    "keywords": "AI Gateway",
    "description": "Route AWS Bedrock, Google Vertex AI, Gemini, and Anthropic through one OpenAI-compatible API with Bifrost. Unified auth, failover, and governance.\n\nEnterprise AI teams rarely run a single model from a single provider. A typical production stack pulls Claude from AWS Bedrock for one set of workloads, Gemini from Google Vertex AI for another, the native Anthropic API for direct features like prompt caching, and the Google Gemini API for low-latency consumer endpoints. Each provider speaks a differ",
    "mainEntityOfPage": "https://www.getmaxim.ai/articles/using-bedrock-vertex-gemini-and-anthropic-ai-models-through-bifrost/"
}
```
