Skip to main content

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

  1. Access Google Cloud Console
  2. 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
  3. 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:
  1. In the Google Cloud Console, go to APIs & ServicesLibrary
  2. Search for Vertex AI API and click Enable — this may take a few minutes to complete
  3. Search for Cloud Resource Manager API and click Enable — this is required for project access

Step 2: Create Service Account

Generate Service Account

1

Navigate to IAM & Admin

In the Google Cloud Console, go to IAM & AdminService Accounts
2

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
3

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
Optional Roles (for advanced features):
  • BigQuery User — If integrating with BigQuery
  • Storage Object Viewer — If accessing Cloud Storage
4

Complete Creation

Click Continue and then Done to create the service account

Generate Service Account Key

1

Access Service Account

In the Service Accounts list, click on your newly created service account
2

Create Key

Go to the Keys tabClick Add KeyCreate new key
3

Select Key Type

Choose JSON as the key typeClick Create
4

Download Key File

The JSON key file will be automatically downloadedCritical: Copy and store this file securely — it contains credentials for your service account and cannot be downloaded again
Never share your service account key file or commit it to version control. Store it in a secure location like a password manager.

Step 3: Configure Gemini in Elementum

Add the Provider

  1. In Elementum, go to Organization Settings and select the Providers tab
  2. Click + Provider and select Gemini from the provider options
  3. Configure the provider settings:
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.
  1. 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)

ModelPrimary Use CaseSpeedIntelligenceBest For
Gemini 2.5 ProComplex reasoning and large responsesLowVery HighAdvanced analysis, long-form content, complex problem-solving
Gemini 2.5 FlashFast, balanced performanceVery HighHighGeneral-purpose tasks, customer support, content creation
Gemini 1.5 ProEstablished multimodal performanceMediumHighLarge 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:
  1. In Organization Settings, go to the Services tab
  2. 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.
  3. 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 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

  • 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
  • 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
  • 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

Symptoms: Service account authentication failuresCommon Causes:
  • Invalid service account key
  • Insufficient permissions
  • Disabled APIs
Solutions:
  1. Verify service account key is valid JSON
  2. Check service account roles and permissions
  3. Ensure required APIs are enabled
  4. Regenerate service account key if needed
Symptoms: Cannot access Vertex AI APIsCommon Causes:
  • APIs not enabled
  • Billing not configured
  • Regional restrictions
Solutions:
  1. Enable Vertex AI API in Google Cloud Console
  2. Verify billing is enabled and active
  3. Check regional availability of services
  4. Review project quotas and limits
Symptoms: Requests being throttled or rejectedCommon Causes:
  • Exceeding Vertex AI quotas
  • High concurrent usage
  • Regional quota limitations
Solutions:
  1. Implement exponential backoff
  2. Reduce request frequency
  3. Review and adjust quotas in Google Cloud Console
  4. Distribute load across multiple regions
Symptoms: Expected models don’t appear in service creationCommon Causes:
  • Regional model availability
  • Account access restrictions
  • Model deprecation
Solutions:
  1. Check model availability in your region
  2. Review account access and permissions
  3. Contact Google Cloud support for access issues
  4. Consider alternative models

Security Considerations

  • 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