🌐
GitHub
googleapis.github.io › python-genai
Google Gen AI SDK documentation
Google Gen AI Python SDK provides an interface for developers to integrate Google’s generative models into their Python applications. It supports the Gemini Developer API and Vertex AI APIs. ... Please run one of the following code blocks to create a client for different services (Gemini Developer API or Vertex AI). from google import genai # Only run this block for Gemini Developer API client = genai.Client(api_key='GEMINI_API_KEY')
🌐
GitHub
github.com › googleapis › python-genai
GitHub - googleapis/python-genai: Google Gen AI Python SDK provides an interface for developers to integrate Google's generative models into their Python applications. · GitHub
1 month ago - To make a model more deterministic, lowering the temperature parameter reduces randomness, with values near 0 minimizing variability. Capabilities and parameter defaults for each model is shown in the Vertex AI docs and Gemini API docs respectively. Note that all API methods support Pydantic types and dictionaries, which you can access from google.genai.types.
Starred by 3.8K users
Forked by 929 users
Languages   Python
🌐
Google AI
ai.google.dev › gemini api › gemini api libraries
Gemini API libraries | Google AI for Developers
April 28, 2026 - If you're using an AI coding assistant, install the Gemini API development skill to give your agent access to the latest documentation and best practices. If you're new to the Gemini API, follow our Get started guide to get started. The Google GenAI SDK is available for the Python, ...
🌐
GitHub
googleapis.github.io › python-genai › genai.html
Submodules - Google Gen AI SDK documentation
Usage: .. code-block:: python ... class genai.client.Client(*, enterprise=None, vertexai=None, api_key=None, credentials=None, project=None, location=None, debug_config=None, http_options=None)¶
🌐
PyPI
pypi.org › project › google-generativeai
google-generativeai · PyPI
With Gemini 2.0, we took the chance to create a single unified SDK for all developers who want to use Google's GenAI models (Gemini, Veo, Imagen, etc). As part of that process, we took all of the feedback from this SDK and what developers like about other SDKs in the ecosystem to create the Google Gen AI SDK. The full migration guide from the old SDK to new SDK is available in the Gemini API docs.
      » pip install google-generativeai
    
Published   Dec 16, 2025
Version   0.8.6
🌐
GitHub
github.com › googleapis › python-genai › blob › main › codegen_instructions.md
python-genai/codegen_instructions.md at main · googleapis/python-genai
Official Documentation: ai.google.dev/gemini-api/docs · Always use the Google GenAI SDK (google-genai), which is the unified standard library for all Gemini API requests (AI Studio/Gemini Developer API and Vertex AI) as of 2025.
Author   googleapis
🌐
Google
docs.cloud.google.com › gemini enterprise agent platform › google gen ai sdk
Google Gen AI SDK | Gemini Enterprise Agent Platform | Google Cloud Documentation
from google import genai from google.genai.types import HttpOptions client = genai.Client(http_options=HttpOptions(api_version="v1")) response = client.models.generate_content( model="gemini-3.5-flash", contents="How does AI work?", ) print(response.text) # Example response: # Okay, let's break down how AI works.
🌐
Google
docs.cloud.google.com › python › client libraries › vertex generative ai sdk for python
Vertex Generative AI SDK for Python | Python client libraries | Google Cloud Documentation
from google import genai from google.genai import types as genai_types # Create a Client in the Gen AI SDK genai_client = genai.Client(vertexai=True, project="your-project", location="your-location") # Call generate_content() with the prompt response = genai_client.models.generate_content( model=retrieved_prompt.prompt_data.model, contents=retrieved_prompt.assemble_contents(), )
🌐
Google AI
ai.google.dev › gemini api › getting started with gemini api
Getting started with Gemini API | Google AI for Developers
2 weeks ago - The Interactions API is available through the Python and JavaScript SDKs, as well as through REST. To use the Gemini API, you need an API key. Create one for free to get started: ... Install the SDK and generate text with a single API call. ... from google import genai client = genai.Client() interaction = client.interactions.create( model="gemini-3.5-flash", input="Explain how AI works in a few words" ) print(interaction.output_text)
Find elsewhere
🌐
Langchain
docs.langchain.com › oss › python › integrations › llms › google_generative_ai
GoogleGenerativeAI integration - Docs by LangChain
from langchain_google_genai import GoogleGenerativeAI, HarmBlockThreshold, HarmCategory llm = GoogleGenerativeAI( model="gemini-pro", google_api_key=api_key, safety_settings={ HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT: HarmBlockThreshold.BLOCK_NONE, }, ) For an enumeration of the categories and thresholds available, see Google’s safety settings guide. Connect these docs to Claude, VSCode, and more via MCP for real-time answers.
🌐
GitHub
github.com › google-gemini › generative-ai-python › blob › main › docs › api › google › generativeai.md
deprecated-generative-ai-python/docs/api/google/generativeai.md at main · google-gemini/deprecated-generative-ai-python
import google.generativeai as genai import os genai.configure(api_key=os.environ['API_KEY']) model = genai.GenerativeModel(model_name='gemini-1.5-flash') response = model.generate_content('Teach me about how an LLM works') print(response.text) ...
Author   google-gemini
🌐
Llamaindex
developers.llamaindex.ai › python › examples › llm › google_genai
Google GenAI | Developer Documentation
In this notebook, we show how to use the google-genai Python SDK with LlamaIndex to interact with Google GenAI models.
🌐
PyPI
pypi.org › project › google-genai
google-genai · PyPI
2 weeks ago - To make a model more deterministic, lowering the temperature parameter reduces randomness, with values near 0 minimizing variability. Capabilities and parameter defaults for each model is shown in the Vertex AI docs and Gemini API docs respectively. Note that all API methods support Pydantic types and dictionaries, which you can access from google.genai.types.
      » pip install google-genai
    
Published   Jun 24, 2026
Version   2.10.0
🌐
Langchain
reference.langchain.com › python › langchain-google-genai
langchain_google_genai | LangChain Reference
Python API reference for langchain_google_genai. Part of the LangChain ecosystem.
🌐
Chatting With Models
chattingwithmodels.wordpress.com › 2025 › 04 › 06 › a-beginners-guide-to-the-google-gen-ai-sdk-for-python
A Beginner’s Guide to the Google Gen AI SDK for Python
April 6, 2025 - Google Gen AI SDK – Gemini API, accessed April 6, 2025, https://ai.google.dev/gemini-api/docs/sdks · googleapis/python-genai: Google Gen AI Python SDK provides an interface for developers to integrate Google’s generative models into their Python applications.
🌐
GitHub
github.com › google-gemini › genai-processors
GitHub - google-gemini/genai-processors: GenAI Processors is a lightweight Python library that enables efficient, parallel content processing. · GitHub
The GenAI Processors library requires Python 3.10+. ... Generative models are often unaware of recent API and SDK updates and may suggest outdated or legacy code. We recommend using our Code Generation instructions when generating code that ...
Starred by 2.1K users
Forked by 215 users
Languages   Python 77.7% | Jupyter Notebook 14.0% | HTML 8.3%
🌐
GitHub
raw.githubusercontent.com › googleapis › python-genai › refs › heads › main › README.md
Google Gen AI SDK
# Google Gen AI SDK [![PyPI ... https://googleapis.github.io/python-genai/ ----- Google Gen AI Python SDK provides an interface for developers to integrate Google's generative models into their Python applications....