Overview
Google Gemini provides language models through Google Cloud’s Vertex AI platform, including Gemini 2.5 Pro, Gemini 2.5 Flash, and Gemini 1.5 Pro. This guide walks you through setting up Google Gemini as an AI Provider in Elementum.Prerequisites: You’ll need a Google Cloud account with billing enabled and access to Vertex AI APIs.
Step 1: Set Up Google Cloud Project
Create or Select a Project
-
Access Google Cloud Console
- Go to console.cloud.google.com
- Sign in with your Google account
-
Create a New Project (or select an existing one)
- Click on the project selector at the top of the page
- Click New Project
- Enter a project name (e.g., “Elementum AI Integration”)
- Select your billing account
- Click Create
-
Enable Billing
- Ensure your project has billing enabled
- Navigate to Billing in the left sidebar
- Link a billing account if not already configured
Enable Required APIs
Enable the following APIs for Vertex AI access:- In the Google Cloud Console, go to APIs & Services → Library
- Search for Vertex AI API and click Enable — this may take a few minutes to complete
- Search for Cloud Resource Manager API and click Enable — this is required for project access
Step 2: Create Service Account
Generate Service Account
Create Service Account
Click Create Service AccountService Account Name: Enter a descriptive name (e.g., “elementum-ai-service”)Service Account ID: Will be auto-generatedDescription: Optional description for the service account
Grant Permissions
Assign the following roles to your service account:Required Role:
- Vertex AI User (
roles/aiplatform.user) — Access to Vertex AI models including Gemini
- BigQuery User — If integrating with BigQuery
- Storage Object Viewer — If accessing Cloud Storage
Generate Service Account Key
Step 3: Configure Gemini in Elementum
Add the Provider
- In Elementum, go to Organization Settings and select the Providers tab
- Click + Provider and select Gemini from the provider options
- Configure the provider settings:
- Basic Configuration
- Service Account
Provider Name: Enter a descriptive name (e.g., “Google Gemini Production”)Location: Select your Google Cloud region (e.g., “us-central1”)Project ID: Enter your Google Cloud project IDCloudLink: Select which CloudLinks can access models from this provider. Leave as “All CloudLinks” unless you need to restrict access.
- Click Save to create the provider. Elementum will automatically validate your credentials — look for a green checkmark indicating a successful connection.
Step 4: Review Available Models
Once your provider is connected, the following Gemini models are available for use in AI Services:Language Models (LLMs)
| Model | Primary Use Case | Speed | Intelligence | Best For |
|---|---|---|---|---|
| Gemini 2.5 Pro | Complex reasoning and large responses | Low | Very High | Advanced analysis, long-form content, complex problem-solving |
| Gemini 2.5 Flash | Fast, balanced performance | Very High | High | General-purpose tasks, customer support, content creation |
| Gemini 1.5 Pro | Established multimodal performance | Medium | High | Large document analysis, production workloads |
Model Recommendations: Use Gemini 2.5 Flash for most daily tasks and general-purpose applications. Choose Gemini 2.5 Pro for complex reasoning that requires the highest intelligence. Gemini 1.5 Pro is reliable for established production workloads.
Note: Embeddings for AI Search are handled exclusively through Snowflake Cortex. Gemini models are used for LLM services only.
Step 5: Create Your First AI Service
With your Gemini provider configured, create an AI Service:- In Organization Settings, go to the Services tab
- Click + Service and select LLM (Language Model service). Configure the service name, select from available Gemini models, and optionally set cost per million tokens for tracking.
- Use the built-in testing interface to verify your service works correctly
Usage Guidelines
Cost Management
Google Cloud charges for Vertex AI usage. To manage costs:- Monitor Usage
- Optimize Usage
- Monitor usage in the Google Cloud Console
- Set up billing alerts for cost control
- Review and adjust API quotas as needed
- Regularly review usage patterns
Best Practices
Model Selection
Model Selection
- Use Gemini 2.5 Flash for most general-purpose tasks and customer support
- Use Gemini 2.5 Pro for complex reasoning, advanced analysis, and large responses
- Use Gemini 1.5 Pro for established production workloads requiring reliable performance
Prompt Engineering
Prompt Engineering
- Be specific and clear in your prompts
- Use system messages for consistent behavior
- Provide examples for better results
- For Gemini 2.5 Pro, structure complex problems step-by-step
Performance Optimization
Performance Optimization
- Select Google Cloud regions closest to your users
- Choose Gemini 2.5 Pro for tasks requiring detailed analysis
- Use Gemini 2.5 Flash for high-volume, simple tasks
- Implement retry logic for transient errors
Troubleshooting
Authentication Errors
Authentication Errors
Symptoms: Service account authentication failuresCommon Causes:
- Invalid service account key
- Insufficient permissions
- Disabled APIs
- Verify service account key is valid JSON
- Check service account roles and permissions
- Ensure required APIs are enabled
- Regenerate service account key if needed
API Access Issues
API Access Issues
Symptoms: Cannot access Vertex AI APIsCommon Causes:
- APIs not enabled
- Billing not configured
- Regional restrictions
- Enable Vertex AI API in Google Cloud Console
- Verify billing is enabled and active
- Check regional availability of services
- Review project quotas and limits
Rate Limit Issues
Rate Limit Issues
Symptoms: Requests being throttled or rejectedCommon Causes:
- Exceeding Vertex AI quotas
- High concurrent usage
- Regional quota limitations
- Implement exponential backoff
- Reduce request frequency
- Review and adjust quotas in Google Cloud Console
- Distribute load across multiple regions
Model Unavailable
Model Unavailable
Security Considerations
- Service Account Security
- Data Privacy
- Regularly rotate service account keys
- Use IAM roles for fine-grained access control
- Monitor service account usage for anomalies
- Enable audit logging for security tracking
Advanced Configuration
Multi-Region Setup
For global deployments, consider the following when selecting regions:- Region Selection: Choose regions closest to your users for lower latency
- Data Residency: Ensure your region choices meet data residency requirements
- Failover: Implement failover strategies across regions for high availability
- Compliance: Verify regional compliance with applicable regulations
Custom Model Access
If you need access to specialized or private models in Vertex AI:- Model Registration: Register custom models in Vertex AI
- Access Control: Configure proper IAM permissions for model access
- Monitoring: Set up custom monitoring and alerting for model performance
Next Steps
With Google Gemini configured as your AI Provider:Create AI Services
Set up specific LLM and embedding services for your workflows
Configure Snowflake Cortex
Set up Snowflake Cortex for AI Search and embeddings
Build Agents
Create conversational AI assistants using Gemini models
Use AI Actions
Add AI capabilities to your automation workflows