Gemini API Libraries

This page provides information about how to download or install the libraries for accessing the Gemini API. If you're new to the Gemini API, try out the API quickstart.

Python

We provide a Python SDK which you can install by running:

pip install google-genai

JavaScript and TypeScript (Preview)

We provide a JavaScript and TypeScript SDK which you can install by running:

npm install @google/genai

Go (Preview)

We provide a Go SDK which you can install by running:

go get github.com/google/generative-ai-go

Previous SDKs

The following is a set of our previous SDK's which are no longer being actively developed: