🌐
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 - Please run one of the following code blocks to create a client for different services (Gemini Developer API or Agent Platform). from google import genai # Only run this block for Gemini Developer API client = genai.Client(api_key='GEMINI_API_KEY')
Starred by 3.8K users
Forked by 929 users
Languages   Python
🌐
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.
🌐
GitHub
googleapis.github.io › python-genai
Google Gen AI SDK documentation
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
googleapis.github.io › python-genai › genai.html
Submodules - Google Gen AI SDK documentation
from google import genai client = genai.Client( enterprise=True, project='my-project-id', location='us-central1' )
🌐
Google AI
ai.google.dev › gemini api › migrate to the google genai sdk
Migrate to the Google GenAI SDK | Gemini API | Google AI for Developers
April 28, 2026 - The new SDK will pick up your API key from the GEMINI_API_KEY environment variables, if you don't pass one to the client. ... from google import genai client = genai.Client() # Set the API key using the GEMINI_API_KEY env var.
🌐
PyPI
pypi.org › project › google-generativeai
google-generativeai · PyPI
Google Generative AI High level API client library and tools. ... 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).
      » pip install google-generativeai
    
Published   Dec 16, 2025
Version   0.8.6
🌐
npm
npmjs.com › package › @google › genai
google/genai
1 week ago - import { GoogleGenAI } from '@google/genai'; const ai = new GoogleGenAI({ enterprise: true, project: 'your_project', location: 'your_location', }); For NodeJS environments, you can create a client by configuring the necessary environment variables. Configuration setup instructions depends on whether you're using the Gemini Developer API or the Gemini Enterprise Agent Platform.
      » npm install @google/genai
    
Published   Jun 24, 2026
Version   2.10.0
🌐
GitHub
github.com › googleapis › go-genai
GitHub - googleapis/go-genai: Google Gen AI Go SDK provides an interface for developers to integrate Google's generative models into their Go applications. · GitHub
May 22, 2026 - client, err := genai.NewClient(ctx, &genai.ClientConfig{ Project: project, Location: location, Backend: genai.BackendEnterprise, }) You can create a client by configuring the necessary environment variables. Configuration setup instructions depends on whether you're using the Gemini Developer API or the Gemini API in Gemini Enterprise Agent Platform. Gemini Developer API: Set GOOGLE_API_KEY as shown below:
Starred by 1.1K users
Forked by 152 users
Languages   Go
🌐
GitHub
github.com › googleapis › java-genai
GitHub - googleapis/java-genai: Google Gen AI Java SDK provides an interface for developers to integrate Google's generative models into their Java applications. · GitHub
May 5, 2026 - Client client = Client.builder().apiKey("your-api-key").build(); import com.google.genai.Client; // Use Builder class for instantiation. Explicitly set the project and location, // and set `enterprise(true)` to use Gemini Enterprise Agent Platform backend.
Starred by 377 users
Forked by 115 users
Languages   Java
Find elsewhere
🌐
Google AI
ai.google.dev › gemini api › gemini api libraries
Gemini API libraries | Google AI for Developers
April 28, 2026 - As of May 2025, the Google GenAI SDK has reached General Availability (GA) across all supported platforms and are the recommended libraries to access the Gemini API. They are stable, fully supported for production use, and are actively maintained.
🌐
PyPI
pypi.org › project › google-genai
google-genai · PyPI
2 weeks ago - Please run one of the following code blocks to create a client for different services (Gemini Developer API or Agent Platform). from google import genai # Only run this block for Gemini Developer API client = genai.Client(api_key='GEMINI_API_KEY')
      » pip install google-genai
    
Published   Jun 24, 2026
Version   2.10.0
🌐
Go Packages
pkg.go.dev › google.golang.org › genai
genai package - google.golang.org/genai - Go Packages
3 weeks ago - Add the SDK to your module with go get google.golang.org/genai. ... client, err := genai.NewClient(ctx, &genai.ClientConfig{ APIKey: apiKey, Backend: genai.BackendGeminiAPI, })
🌐
Google AI
ai.google.dev › gemini api › getting started with gemini api
Getting started with Gemini API | Google AI for Developers
2 weeks ago - Stateless: Manage the conversation history on the client by passing all previous turns (including intermediate model thought and tool steps) in each request. Chain interactions by passing previous_interaction_id. The server manages the full conversation history for you. from google import genai client = genai.Client() # Server-side state (recommended) interaction1 = client.interactions.create( model="gemini-3.5-flash", input="I have 2 dogs in my house.", ) print("Response 1:", interaction1.output_text) interaction2 = client.interactions.create( model="gemini-3.5-flash", input="How many paws are in my house?", previous_interaction_id=interaction1.id, ) print("Response 2:", interaction2.output_text)
🌐
Google AI
ai.google.dev › gemini-api › docs
Gemini API | Google AI for Developers
1 week ago - 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)
🌐
Google
docs.cloud.google.com › gemini enterprise agent platform › get started with gemini enterprise agent platform
Get started with Gemini Enterprise Agent Platform | Google Cloud Documentation
5 days ago - 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.
🌐
Analytics Vidhya
analyticsvidhya.com › home › google gen ai python sdk: a complete guide
Google Gen AI Python SDK: A Complete Guide
August 17, 2025 - You will create an instance of the client for each interaction with the Google generative AI models. You will instantiate the client with different methods depending on the API you are using. For the Gemini Developer API, you can instantiate the client by passing along your API key: client = genai.Client(api_key='YOUR_GEMINI_API_KEY')
🌐
Google AI
ai.google.dev › gemini api › get started with gemini live api using the google genai sdk
Get started with Gemini Live API using the Google GenAI SDK | Gemini API | Google AI for Developers
1 month ago - import asyncio from google import genai client = genai.Client(api_key="YOUR_API_KEY") model = "gemini-3.1-flash-live-preview" config = {"response_modalities": ["AUDIO"]} async def main(): async with client.aio.live.connect(model=model, config=config) as session: print("Session started") # Send content...
🌐
Medium
medium.com › google-cloud › googles-unified-gen-ai-sdk-a-hands-on-guide-ba6a6c088f62
Google’s Unified Gen AI SDK: A Hands-on Guide | by Anand Kumar | Google Cloud - Community | Medium
March 16, 2025 - from google import genai from google.genai import types PROJECT_ID = userdata.get('PROJECT_ID') LOCATION = userdata.get('LOCATION') # Create a client instance using Vertex AI in Google Cloud client = genai.Client(vertexai=True, project=PROJECT_ID, location=LOCATION) response = client.models.generate_content( model='gemini-2.0-flash', contents='Create a short bedtime story for a 3 year old using unicorns and rainbows', config = types.GenerateContentConfig( max_output_tokens=200, temperature = 0.1) ) display(Markdown(response.text))