Skip to main content

Overview

GeminiLiveVertexLLMService enables natural, real-time conversations with Google’s Gemini model through Vertex AI. It provides built-in audio transcription, voice activity detection, and context management for creating interactive AI experiences with multimodal capabilities including audio, video, and text processing.
Want to start building? Check out our Gemini Live Guide for general concepts, then follow the Vertex AI-specific setup below.

Gemini Live Vertex API Reference

Pipecat’s API methods for Gemini Live Vertex AI integration

Example Implementation

Complete Gemini Live Vertex AI function calling example

Vertex AI Gemini Documentation

Official Vertex AI Gemini Live API documentation

Gemini Live Model Card

Gemini Live available models

Installation

To use Gemini Live Vertex AI services, install the required dependencies:

Prerequisites

Google Cloud Setup

Before using Gemini Live Vertex AI services, you need:
  1. Google Cloud Project: Set up a project in the Google Cloud Console
  2. Vertex AI API: Enable the Vertex AI API in your project
  3. Service Account: Create a service account with roles/aiplatform.user and roles/ml.developer permissions
  4. Authentication: Set up service account credentials or Application Default Credentials

Required Environment Variables

  • GOOGLE_VERTEX_TEST_CREDENTIALS: JSON string of service account credentials (optional if using ADC)
  • GOOGLE_CLOUD_PROJECT_ID: Your Google Cloud project ID
  • GOOGLE_CLOUD_LOCATION: Vertex AI region (e.g., “us-east4”)

Key Features

  • Enterprise Authentication: Secure service account-based authentication
  • Multimodal Processing: Handle audio, video, and text inputs simultaneously
  • Real-time Streaming: Low-latency audio and video processing
  • Voice Activity Detection: Automatic speech detection and turn management
  • Function Calling: Advanced tool integration and API calling capabilities
  • Context Management: Intelligent conversation history and system instruction handling

Configuration

GeminiLiveVertexLLMService

This service extends GeminiLiveLLMService with Vertex AI authentication. It accepts all the same parameters as the Gemini Live service, with these differences:
str
default:"None"
JSON string of Google service account credentials. If not provided, falls back to credentials_path or Application Default Credentials (ADC).
str
default:"None"
Path to a service account JSON file. Used if credentials is not provided.
str
required
GCP region for the Vertex AI endpoint (e.g., "us-east4").
str
required
Google Cloud project ID.
str
default:"google/gemini-live-2.5-flash-native-audio"
deprecated
Vertex AI model identifier to use.Deprecated in v0.0.105. Use settings=GeminiLiveVertexLLMService.Settings(model=...) instead.
str
default:"Charon"
deprecated
TTS voice identifier for audio responses.Deprecated in v0.0.105. Use settings=GeminiLiveVertexLLMService.Settings(voice=...) instead.
str
default:"None"
System prompt for the model. Can also be provided via the LLM context.
List[dict] | ToolsSchema
default:"None"
Tools/functions available to the model. Can also be provided via the LLM context.
InputParams
default:"InputParams()"
deprecated
Runtime-configurable generation and session settings. See the Gemini Live InputParams for details.Deprecated in v0.0.105. Use settings=GeminiLiveVertexLLMService.Settings(...) instead.
GeminiLiveVertexLLMService.Settings
default:"None"
Runtime-configurable settings. See the Gemini Live Settings for the full reference.
bool
default:"False"
Whether to start with audio input paused.
bool
default:"False"
Whether to start with video input paused.
bool
default:"True"
Whether to generate a response when context is first set. Set to False to wait for user input before the model responds.
HttpOptions
default:"None"
HTTP options for the Google API client.

Settings

The Vertex AI variant uses the same Settings as the base Gemini Live service. See Gemini Live Settings for the full reference.

Usage

Basic Setup with Service Account Credentials

With Credentials File

Using Application Default Credentials (ADC)

With Settings

The InputParams / params= pattern is deprecated as of v0.0.105. Use Settings / settings= instead. See the Service Settings guide for migration details.

Notes

  • No api_key parameter: Unlike the base GeminiLiveLLMService, Vertex AI uses service account credentials or ADC for authentication. Passing api_key will raise a ValueError.
  • Authentication priority: The service tries credentials in this order: (1) credentials JSON string, (2) credentials_path file, (3) Application Default Credentials (ADC).
  • File API not supported: The Gemini File API is not available through Vertex AI. Use Google Cloud Storage for file handling instead.
  • Model naming: Vertex AI uses different model identifiers (e.g., "google/gemini-live-2.5-flash-native-audio") compared to the Google AI variant.
  • Async tool limitation: Vertex AI’s Gemini Live endpoint does not currently support NON_BLOCKING tool calls. Functions registered with cancel_on_interruption=False will log a one-time warning and fall back to synchronous behavior (the conversation pauses while the tool runs). Use cancel_on_interruption=True (the default) or use a non-realtime LLM service if your tool requires async semantics.
  • All other features (VAD, context compression, thinking, function calling, etc.) work identically to the base Gemini Live service.