Create a free Google account, generate your Gemini API key at Google AI Studio, set up billing for production, then integrate with Bifrost for advanced multi-model routing and cost governance. Complete in minutes.
Bifrost supports Gemini models through HTTP APIs with comprehensive multimodal support for text, images, audio, and video inputs. Access the latest Google AI models with free API keys.
| Property | Details |
|---|---|
| Description | Google Gemini provides multimodal AI capabilities including text, vision, audio, and video processing with advanced reasoning and coding support. |
| Provider route on Bifrost | gemini/<model> |
| Provider doc | Google AI Documentation |
| API endpoint for provider | https://generativelanguage.googleapis.com/v1beta |
| Supported endpoints | /v1/models, /v1/chat/completions, /v1/responses, /v1/images/generations, /v1/images/edits, /v1/embeddings, /v1/audio/speech, /v1/audio/transcriptions, /v1/files, /v1/batches, /v1/count-tokens, /v1/videos |
Use these Google-hosted links for console access, API documentation, and authentication details.
Before you begin, you will need:
[ QUICK START ]
Visit Google AI Studio to get started.
Go to aistudio.google.com and sign in with your Google account. You should land on the Google AI Studio dashboard.

In Google AI Studio, click the "Get API Key" button to access the API key creation interface.
Your key is displayed once. Copy it immediately and store it securely.
Click "Create API key", name your key, choose a Google Cloud project (or use the default), then click "Create key". Copy the key immediately, it is shown only once.

export GEMINI_API_KEY="AIza..."
Add a payment method when ready for higher limits.
Google Gemini offers a free tier with daily rate limits. For production use or higher volume, enable billing in Google Cloud Console.
Authenticate with Bearer tokens per Gemini's HTTP API.
Use Gemini's REST API with x-goog-api-key header authentication:
$ curl https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent \ -H "Content-Type: application/json" \ -H "x-goog-api-key: $GEMINI_API_KEY" \ -d '{ "contents": [{"role":"user","parts":[{"text":"Hello!"}]}] }'
[ MODELS ]
| Model | API ID | Best for |
|---|---|---|
| Gemini 3.1 Pro Preview | gemini-3.1-pro-preview | Advanced reasoning, agents, and complex coding. |
| Gemini 3 Flash Preview | gemini-3-flash-preview | Frontier performance at lower cost. |
| Gemini 3.1 Flash-Lite | gemini-3.1-flash-lite | Stable, budget-friendly multimodal workloads. |
| Gemini 2.5 Pro | gemini-2.5-pro | Deep reasoning and advanced coding. |
| Gemini 2.5 Flash | gemini-2.5-flash | Best price-performance for high-volume tasks. |
| Gemini 2.5 Flash-Lite | gemini-2.5-flash-lite | Fastest, most budget-friendly 2.5 model. |
| Gemini 2.5 Flash Image (Nano Banana) | gemini-2.5-flash-image | Native image generation and editing. |
| Gemini 3 Pro Image Preview (Nano Banana Pro) | gemini-3-pro-image-preview | Studio-quality image generation. |
| Gemini 3.1 Flash Image Preview | gemini-3.1-flash-image-preview | High-efficiency visual creation. |
| Veo 3.1 Preview | veo-3.1-generate-preview | Cinematic video with synchronized audio. |
| Veo 3.1 Lite Preview | veo-3.1-lite-generate-preview | Cost-efficient video generation. |
| Imagen 4 | imagen-4.0-generate-001 | Text-to-image up to 2K resolution. |
| Gemini Embedding 2 | gemini-embedding-2 | Multimodal embeddings for RAG and search. |
| Gemini Embedding | gemini-embedding-001 | Text embeddings for semantic search. |
| Gemini 2.5 Flash Live Preview | gemini-2.5-flash-native-audio-preview-12-2025 | Real-time voice and video agents. |
| Gemini 2.5 Flash TTS Preview | gemini-2.5-flash-preview-tts | Controllable text-to-speech. |
| Lyria 3 Pro Preview | lyria-3-pro-preview | Full-length music generation. |
| Computer Use Preview | gemini-2.5-computer-use-preview-10-2025 | UI automation and browser agents. |
| Deep Research Preview | deep-research-preview-04-2026 | Multi-step research with citations. |
Models and availability change over time. See the Google's Gemini models documentation for the latest list and pricing.
[ TROUBLESHOOTING ]
| Error | Likely Cause | What to Do |
|---|---|---|
401 Unauthorized | Invalid or missing API key. | Verify your API key is correct and properly formatted. Generate a new key if needed. |
400 Invalid Request | Invalid request format or unsupported model. | Check request format against Gemini API reference. Verify model ID is current. |
429 Rate Limited | Rate limit exceeded for your plan or tier. | Enable billing for higher limits. Implement exponential backoff. Use Bifrost for load distribution. |
500 Server Error | Temporary Google service unavailability. | Retry after a delay. Check Google Cloud status page. Configure failover with Bifrost. |
[ PRODUCTION-READY ]
Bifrost is a drop-in replacement for Gemini SDKs. Update your base URL and keep your client code. Bifrost handles cost tracking, virtual keys, budgets, and intelligent failover.
Run the Bifrost gateway and configure your Gemini credentials in the Web UI.
$ npx -y @maximhq/bifrost
✓ Bifrost started ├─ HTTP server listening on http://localhost:8080 ├─ Web UI available at http://localhost:8080 └─ Configure providers and virtual keys in the dashboard
Update your SDK to route through Bifrost's unified gateway.
import anthropic # BEFORE # client = anthropic.Anthropic(api_key="your-gemini-key") # AFTER: route via Bifrost + virtual key client = anthropic.Anthropic( api_key="sk-bf-your-virtual-key", base_url="http://localhost:8080/anthropic" ) response = client.messages.create( model="gemini-2.0-flash", max_tokens=1024, messages=[{"role": "user", "content": "Hello from Bifrost!"}] ) print(response.content[0].text)
x-bf-vk or Authorization: Bearer sk-bf-* per the Bifrost documentation.[ WHAT'S NEXT ]
You have your API key. Add governance, guardrails, and MCP controls for production.
[ 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 ]
No. The Gemini API can be accessed via simple API key authentication without a Google Cloud project. However, for production workloads, enterprise features, and advanced monitoring, consider using Google Cloud Console with billing.
Google offers gemini-2.0-flash, gemini-1.5-pro, gemini-1.5-flash, and other models. Visit the Gemini API documentation to see the latest available models and their capabilities.
Yes, Gemini API has a free tier with daily rate limits. For production use or higher volume, enable billing in Google Cloud Console or sign up for a paid plan.
Implement exponential backoff in your client. Upgrade to a paid plan for higher limits. Use Bifrost to distribute requests across multiple providers for resilience.
Gemini has its own API format. However, Bifrost provides OpenAI-compatible routing for Gemini, allowing you to use OpenAI SDKs seamlessly.
Bifrost provides cost tracking, virtual keys, budget governance, and automatic failover across multiple providers including Gemini, reducing infrastructure complexity.