Download or install libraries to access Gemini

This page provides information about how to download or install the libraries for accessing Gemini.

Python
The SDK: pip install google-generativeai
The low-level client library: pip install google-ai-generativelanguage
Go
Run go get github.com/google/generative-ai-go
Node.js
npm install @google/generative-ai
Web
Add import { GoogleGenerativeAI } from 'https://esm.run/@google/generative-ai' to you web app
Dart (Flutter)
For Dart: Run dart pub add google_generative_ai
For Flutter: Run flutter pub add google_generative_ai
Swift
Add generative-ai-swift to your Xcode project using Swift Package Manager.
Android
Add the dependency implementation("com.google.ai.client.generativeai:generativeai:0.3.0") to your Android project.