Gemini 1.5 Pro 2M context window, code execution capabilities, and Gemma 2 are now available.
Learn more
Download or install libraries to access Gemini
Stay organized with collections
Save and categorize content based on your preferences.
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.9.0")
to your Android project.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-16 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]