Skip to content

Google Cloud & Vertex AI Setup

Vertex AI is Google's platform that offers text and multimodal models (Gemini), plus ASR and TTS under one roof with EU regions. Admin Bud-E includes a small OpenAI-compatible proxy so your clients can call Vertex/Gemini as if it were the OpenAI API — you keep a uniform client side while the proxy translates.

What You'll Need

You create a Google Cloud project, enable APIs, create a service account with a JSON key, choose an EU region, and add a provider named vertex in Admin Bud-E. Then you set routes and pricing.

TIP

Alternatives like Together or Mistral can be added the same way (provider + route).

Understanding the Terms

OpenAI-Compatible API

The OpenAI API format (POST /v1/chat/completions with Authorization: Bearer ...) has become a de-facto standard. Many providers offer OpenAI-compatible endpoints, allowing clients to switch providers with minimal code changes.

Admin Bud-E's built-in proxy translates these requests to Google's Vertex AI format, so your frontend can use the familiar OpenAI structure.

Vertex AI

Google's managed AI platform that provides:

  • Gemini models (text and multimodal/vision)
  • Text-to-Speech (Cloud TTS)
  • Speech-to-Text (Cloud STT)
  • EU region options for GDPR compliance
  • Pay-as-you-go pricing with no upfront commitment

Free Trial Credit

New Google Cloud accounts typically receive $300 in free credits valid for 90 days. This is enough to test and evaluate the system before committing to paid usage.

Step-by-Step Setup

1. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click Select a projectNew Project
  3. Give it a meaningful name (e.g., "School-Bud-E-Prod")
  4. Click Create

2. Enable Billing

  1. Navigate to Billing in the left sidebar
  2. Link a billing account (credit card required, but you won't be charged during the trial)
  3. Confirm your billing account is active

WARNING

You need billing enabled even for the free trial. Google doesn't charge until you exceed the trial credit or 90 days expire.

3. Enable Required APIs

Enable these APIs in your project:

Vertex AI API

  1. Go to APIs & ServicesLibrary
  2. Search for "Vertex AI API"
  3. Click Enable

Cloud Text-to-Speech API (if using TTS)

  1. In the API Library, search for "Cloud Text-to-Speech API"
  2. Click Enable

Cloud Speech-to-Text API (if using ASR)

  1. In the API Library, search for "Cloud Speech-to-Text API"
  2. Click Enable

4. Create a Service Account & JSON Key

A service account is a special Google account that represents your application (not a human user).

  1. Navigate to IAM & AdminService Accounts
  2. Click Create Service Account
  3. Name it (e.g., "admin-bude-sa")
  4. Click Create and Continue
  5. Grant the following roles:
    • Vertex AI User
    • Cloud Speech-to-Text API User (if using ASR)
    • Cloud Text-to-Speech API User (if using TTS)
  6. Click ContinueDone
  7. Click on the newly created service account
  8. Go to the Keys tab
  9. Click Add KeyCreate new key
  10. Choose JSON format
  11. Click Create — the JSON file downloads automatically

DANGER

Store this JSON file securely! It contains credentials that allow access to your Google Cloud resources. Never commit it to version control or share it publicly.

5. Choose Your Region

For GDPR compliance and lower latency, select an EU region:

Recommended EU regions:

  • europe-west1 (Belgium)
  • europe-west3 (Frankfurt)
  • europe-west4 (Netherlands)
  • europe-west9 (Paris)

Check Vertex AI locations and Generative AI locations for up-to-date availability.

6. Configure Provider in Admin Bud-E

Now connect your Google Cloud project to Admin Bud-E:

  1. Log into your Admin Bud-E dashboard at https://your-domain.com/admin
  2. Navigate to Providers
  3. Click Add Provider
  4. Fill in:
    • Name: vertex (must be exactly this for the proxy to work)
    • Base URL: Leave empty or use the proxy endpoint
    • API Key / JSON: Paste the entire contents of your JSON key file
    • Region: Your chosen EU region (e.g., europe-west4)
  5. Click Save

WARNING

The provider name must be exactly vertex (lowercase) for the OpenAI-compatible proxy to recognize it.

7. Configure Routes

Routes define which provider handles which type of request:

  1. Navigate to Routes in the Admin UI
  2. Create routes for each service type:

LLM Route:

  • Type: LLM
  • Provider: vertex
  • Model: gemini-1.5-flash or gemini-1.5-pro
  • Priority: 1

VLM Route (Vision/Multimodal):

  • Type: VLM
  • Provider: vertex
  • Model: gemini-1.5-flash or gemini-1.5-pro
  • Priority: 1

TTS Route:

  • Type: TTS
  • Provider: vertex
  • Model: en-US-Neural2-C (or another voice)
  • Priority: 1

ASR Route:

  • Type: ASR
  • Provider: vertex
  • Model: default (or latest_long)
  • Priority: 1

TIP

Lower priority numbers run first. Add multiple providers with different priorities to enable automatic failover.

8. Set Pricing

Define costs so the middleware can deduct credits correctly:

  1. Navigate to Pricing in the Admin UI
  2. Add pricing entries for each model:

LLM/VLM Pricing:

  • Model: gemini-1.5-flash
  • Input cost: Cost per 1,000,000 input tokens (check Google pricing)
  • Output cost: Cost per 1,000,000 output tokens

TTS Pricing:

  • Model: Your chosen voice
  • Cost: Per character (typically ~$0.000016 per character)

ASR Pricing:

  • Model: Your chosen model
  • Cost: Per hour of audio (typically ~$0.024 per minute)

INFO

Token-based ASR pricing is supported if the provider reports token usage. Otherwise, Admin Bud-E falls back to time-based billing.

9. Test the Connection

  1. From the Admin UI, try a test request
  2. Check the Usage page to verify:
    • Request appears in logs
    • Credits were deducted correctly
    • No error messages

Troubleshooting

Provider Not Appearing in Routes

Problem: You created a provider but it doesn't show in the Routes dropdown.

Solution: Ensure the provider name is exactly vertex (lowercase, no spaces).

Authentication Errors

Problem: "Permission denied" or "Invalid credentials" errors.

Solution:

  1. Verify the JSON key is complete and valid
  2. Check that the service account has the required roles
  3. Ensure the APIs are enabled in your Google Cloud project

Wrong Region

Problem: Requests are going to non-EU regions.

Solution: Double-check the region setting in your Provider configuration. The middleware passes this to Vertex AI.

Quota Exceeded

Problem: "Quota exceeded" or rate limit errors.

Solution:

  1. Check your quota limits in Google Cloud Console → IAM & AdminQuotas
  2. Request a quota increase if needed
  3. Consider adding fallback providers in your Routes

Next Steps