google-generativeai
Google Generative AI High level API client library and tools.
What it is and what it does
google-generativeai is a Python client library for accessing Google's Gemini generative AI models through a high-level API. It wraps the underlying Google AI services (generativelanguage, api-core, api-python-client, and auth) to provide a simpler interface for tasks like text generation, multimodal input, and conversation management.
However, this package is now deprecated and archived. Google has replaced it with the Google Generative AI SDK (python-genai), which incorporates feedback from this library and aligns with a unified approach across all Google GenAI models. The repository is in limited maintenance mode, accepting only critical bug fixes, with all support ending permanently on November 30, 2025. Existing users are strongly encouraged to migrate to the new SDK rather than start new projects with this library.
Use it for:
- Migrating legacy code that was built against this SDK before the deprecation announcement.
- Maintaining existing applications that depend on this library while planning a transition to the new SDK.
- Understanding the evolution of Google's GenAI Python tooling by studying the old SDK design.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python client library for calling Google's Gemini generative AI models, though the package is now deprecated in favor of the Google Generative AI SDK.
No. This package is deprecated and archived, with all support ending November 30, 2025. The maintainers explicitly recommend migrating to the Google Generative AI SDK instead. Install only if you are maintaining legacy code that already depends on it; do not use for new projects.
Install
google-generativeai on PyPI
pip
pip install google-generativeaiuv
uv add google-generativeaipoetry
poetry add google-generativeaiInstalling google-generativeai
Before you install
Low install friction with a pure-Python wheel and standard dependencies. However, the package is abandoned as of November 30, 2025, with the repository archived and development restricted to critical bug fixes only. New projects should not adopt this library.
License in practice
Licensed under Apache 2.0 (permissive), so commercial and proprietary use is permitted with minimal restrictions. However, the deprecated status overrides any licensing advantage.
Quickstart
pip install google-generativeai
import google.generativeai as genai
genai.configure(api_key="YOUR_API_KEY")
model = genai.GenerativeModel("gemini-pro")
response = model.generate_content("Hello world")
Requires a valid Google AI API key; the package is no longer maintained and all support ended November 30, 2025.
Verify before relying
- Whether critical bug fixes will actually be applied after the November 30, 2025 end-of-life date or if the package is truly frozen.
- Compatibility guarantees with future Gemini API changes after the support cutoff.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — google-ai-generativelanguage, google-api-core, google-api-python-client, google-auth, protobuf, pydantic, tqdm, typing-extensions |
| Maintenance | abandoned — 241 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 16,418,743/month — #1,152 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_generativeai-0.8.6-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
google-genaiPython SDK for integrating Google's Gemini…
permissive · top 1,000 on PyPI
google-ai-generativelanguagePython client library for the Gemini API,…
permissive · top 5,000 on PyPI
vertexaiPython SDK for building, deploying, and…
permissive · top 5,000 on PyPI
google-cloud-aiplatformPython SDK for building, deploying, and…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-google-generativeaiAutomatically traces prompts, completions, and…
permissive · top 5,000 on PyPI
generative-ai-hub-sdkProvides Python access to generative AI models…
unclear · top 15,000 on PyPI
livekit-plugins-googleIntegrates Google Cloud AI services (Gemini,…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-google-genaiAdds OpenTelemetry instrumentation to the…
permissive · top 5,000 on PyPI
langchain-google-genaiIntegrates Google's Gemini AI models (chat,…
permissive · top 5,000 on PyPI
google-apitoolsProvides utilities for building client-side…
permissive · top 5,000 on PyPI