Overview
Bifrost provides complete Google GenAI API compatibility through protocol adaptation. The integration handles request transformation, response normalization, and error mapping between Google’s GenAI API specification and Bifrost’s internal processing pipeline. This integration enables you to utilize Bifrost’s features like governance, load balancing, semantic caching, multi-provider support, and more, all while preserving your existing Google GenAI SDK-based architecture. Endpoint:/genai
Setup
- Python
- JavaScript
Provider/Model Usage Examples
Use multiple providers through the same GenAI SDK format by prefixing model names with the provider:- Python
- JavaScript
Adding Custom Headers
Pass custom headers required by Bifrost plugins (like governance, telemetry, etc.):- Python
- JavaScript
Using Direct Keys
Pass API keys directly in requests to bypass Bifrost’s load balancing. You can pass any provider’s API key (OpenAI, Anthropic, Mistral, etc.) since Bifrost only looks forAuthorization, x-api-key and x-goog-api-key headers. This requires the Allow Direct API keys option to be enabled in Bifrost configuration.
Learn more: See Key Management for enabling direct API key usage.
- Python
- JavaScript
Dynamic Thinking Budget
WhenthinkingConfig.thinkingBudget is set to -1, Bifrost handles it differently per provider:
- Gemini: Preserves
-1for native dynamic thinking support - Anthropic, Bedrock, Cohere: Converts to minimum reasoning budget value (1024)
- OpenAI: Converts to medium reasoning effort
Supported Features
The Google GenAI integration supports all features that are available in both the Google GenAI SDK and Bifrost core functionality. If the Google GenAI SDK supports a feature and Bifrost supports it, the integration will work seamlessly.Next Steps
- OpenAI SDK - GPT integration patterns
- Configuration - Bifrost setup and configuration
- Core Features - Advanced Bifrost capabilities

