Google Gen AI libraries

This page provides information on downloading and installing the latest libraries for the Gemini API. If you're new to the Gemini API, get started with the API quickstart.

Important note about google-genai libraries

We've recently launched a new set of libraries that provide a more consistent and streamlined experience for accessing Google's generative AI models across different Google services.

Vertex AI libraries are only supported on the Vertex AI platform.

Key library updates

Language Vertex AI library New library (Recommended)
Python google-cloud-aiplatform
GenerativeModel Module Deprecated in May 2026
google-genai
Go cloud.google.com/vertexai
Deprecated in May 2026
google.golang.org/genai
JavaScript and TypeScript @google-cloud/vertexai
Deprecated in May 2026
@google/genai
Available in Preview
Java google-cloud-vertexai
Deprecated in May 2026
java-genai
Available in Preview

Users are encouraged to start with the new library and migrate from previous libraries.

Install a library

The following examples can help you get started in various programming languages.

Install our Python library by running:

    pip install google-genai