Skip to main content

Overview

Bifrost provides 100% Google GenAI API compatibility with enhanced features:
  • Zero code changes - Works with existing Google GenAI SDK applications
  • Same request/response formats - Exact Google GenAI API specification
  • Enhanced capabilities - Multi-provider fallbacks, MCP tools, monitoring
  • Full Gemini model support - All Gemini models and features
  • Any provider under the hood - Use any configured provider (Google, OpenAI, Anthropic, etc.)
Endpoint: POST /genai/v1beta/models/{model}:generateContent
Provider Flexibility: While using Google GenAI SDK format, you can specify any model like "gemini-pro" (uses Google) or "openai/gpt-4o-mini" (uses OpenAI) - Bifrost will route to the appropriate provider automatically.

Quick Migration

Python (Google GenAI SDK)

JavaScript (Google GenAI SDK)


Supported Features

Fully Supported

Enhanced Features


Request Examples

Basic Content Generation

Response:

Multi-turn Conversation

Vision/Multimodal

Function Calling

Response with Function Call:

Advanced Usage

System Instructions

Generation Configuration

Safety Settings

Error Handling


Enhanced Features

Automatic MCP Tool Integration

MCP tools are automatically available in GenAI-compatible requests:

Multi-provider Support

Use multiple providers with Google GenAI SDK format by prefixing model names:

Testing & Validation

Compatibility Testing

Test your existing Google GenAI code with Bifrost:

Function Calling Testing


Multi-Provider Support

Use multiple providers with Google GenAI SDK format by prefixing model names:

Configuration

Bifrost Config for Google GenAI

Environment Variables


Common Issues & Solutions

Issue: “API Key not valid”

Problem: Google API key not being passed correctly Solution:

Issue: “Model not found”

Problem: Gemini model not available in your region/project Solution: Configure fallback in config.json:

Issue: “Authentication failed”

Problem: Service account credentials not configured Solution:

Issue: “Generation failed”

Problem: Content blocked by safety filters Solution:
Architecture: For Google GenAI integration implementation details, see Architecture Documentation.