Skip to main content
The Vertex AI plugin lets you run Genkit on Google Cloud infrastructure. It offers the same Gemini models as the Google AI plugin plus additional enterprise features:
  • IAM-based access control and audit logging
  • VPC Service Controls and data residency options
  • Imagen image generation models
  • Vertex AI Vector Search for production-scale RAG
  • Model Garden (third-party models like Claude, Llama, and more)
In TypeScript, Vertex AI is now exported from the same @genkit-ai/google-genai package as googleAI. The legacy @genkit-ai/vertexai package still exists but is deprecated. In Go and Python, both GoogleAI and VertexAI live in the same package.

Installation

The older @genkit-ai/vertexai package is deprecated. Migrate to @genkit-ai/google-genai to avoid breaking changes in future releases.

Authentication

Vertex AI uses Google Cloud credentials, not API keys.
1

Install the Google Cloud CLI

Follow the official install guide for your platform.
2

Authenticate locally

This writes Application Default Credentials (ADC) to your local machine. On GCP (Cloud Run, GKE, Cloud Functions) credentials are provided automatically by the metadata server.
3

Set your project and region

4

Enable the Vertex AI API

Vertex AI Express Mode lets you use an API key instead of full GCP credentials — great for quick experiments. Get a key from Vertex AI Studio and pass it as apiKey. You don’t need to set projectId or location in Express Mode.

Configuration

Plugin options (TypeScript)

Generating text

Available models

Go and Python plugins use dynamic model discovery — any model supported by the underlying google.golang.org/genai or google-genai SDK is automatically available.

Text embeddings

Available embedders: text-embedding-004, text-embedding-005, text-multilingual-embedding-002, gemini-embedding-001, multimodalembedding@001.

Image generation (Imagen)

Music generation (Lyria)

Lyria is a Vertex AI–only model for instrumental music generation:

Vertex AI Vector Search for RAG

Vertex AI Vector Search provides managed, enterprise-scale nearest-neighbour search. The Go and Python plugins include a Vector Search retriever.

Advanced model configuration

Use Google Search grounding, code execution, and thinking budget:

Deploying to Cloud Run

When deployed to Cloud Run, Cloud Functions, or any GCP service, credentials are automatically inferred from the runtime service account. No additional configuration is needed.
See Cloud Run deployment for a full walkthrough.

Google AI plugin

Same models via the Gemini Developer API — no GCP project needed.

Firebase plugin

Firestore vector search and Firebase telemetry.

RAG guide

Build retrieval-augmented generation pipelines.

Cloud Run deployment

Deploy Genkit flows to Cloud Run.