🌐
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')
Google GenAI .NET SDK
Parameter types are specified in the Google.GenAI.Types namespace. Enums are represented using structs for forward compatibility reasons. Enum values follow C# naming conventions (PascalCase). The SDK enum value contains an underlying string value that is sent to the API, which is usually UPPER_SNAKE_CASE. Please refer to the API documentation ...
Submodules
Find your Google Cloud project ID. ... The location to send API requests to (for example, us-central1). Can be obtained from environment variables. Applies to the Vertex AI API only. ... Config settings that control network behavior of the client. This is typically used when running test code. ... Http options to use for the client. These options will be applied to all requests made by the client. Example usage: client = genai...
🌐
Google
docs.cloud.google.com › gemini enterprise agent platform › google gen ai sdk
Google Gen AI SDK | Gemini Enterprise Agent Platform | Google Cloud Documentation
1 month ago - from google import genai # TODO(developer): Update below line API_KEY = "YOUR_API_KEY" client = genai.Client(vertexai=True, api_key=API_KEY) response = client.models.generate_content( model="gemini-3.5-flash", contents="Explain bubble sort to me.", ) print(response.text) # Example response: # Bubble Sort is a simple sorting algorithm that repeatedly steps through the list · The Google Gen AI SDK for Go is available on go.dev and GitHub:
🌐
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 - By default, the SDK uses the beta API endpoints provided by Google to support preview features in the APIs. The stable API endpoints can be selected by setting the API version to v1. To set the API version use http_options. For example, to set the API version to v1 for Vertex AI: from google import genai from google.genai import types client = genai.Client( enterprise=True, project='your-project-id', location='global', http_options=types.HttpOptions(api_version='v1') )
Starred by 3.8K users
Forked by 929 users
Languages   Python
🌐
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 - You would directly instantiate and interact with GenerativeModel objects. import google.generativeai as genai # Directly create and use model objects model = genai.GenerativeModel('gemini-3.5-flash') response = model.generate_content(...) chat ...
🌐
GitHub
github.com › googleapis › js-genai
GitHub - googleapis/js-genai: TypeScript/JavaScript SDK for Gemini and Vertex AI. · GitHub
April 25, 2026 - Documentation: https://googleapis.github.io/js-genai/ The Google Gen AI JavaScript SDK is designed for TypeScript and JavaScript developers to build applications powered by Gemini.
Starred by 1.6K users
Forked by 251 users
Languages   TypeScript 94.3% | JavaScript 5.1% | HTML 0.3% | Shell 0.2% | Starlark 0.1% | CSS 0.0%
🌐
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 - When a custom OkHttpClient is provided, the SDK will clone it (using newBuilder()) to retain all your custom configurations, while still automatically appending the SDK's internal RetryInterceptor. import com.google.genai.Client; import com.google.genai.types.ClientOptions; import okhttp3.OkHttpClient; import java.time.Duration; // Create your custom OkHttpClient OkHttpClient customHttpClient = new OkHttpClient.Builder() .connectTimeout(Duration.ofSeconds(30)) .readTimeout(Duration.ofSeconds(30)) // Add your custom interceptors, SSL socket factory, etc.
Starred by 377 users
Forked by 115 users
Languages   Java
🌐
Llamaindex
developers.llamaindex.ai › python › examples › llm › google_genai
Google GenAI | Developer Documentation
from llama_index.llms.google_genai import GoogleGenAI ... Here's a cute dog for you! We can also edit the image! ... content="Please edit the image to make the dog a mini-schnauzer, but keep the same overall pose, framing, background, and art style.", ... Here's your mini-schnauzer! Note for AI agents: this documentation is built for programmatic access.
🌐
GitHub
github.com › googleapis › python-genai › blob › main › codegen_instructions.md
python-genai/codegen_instructions.md at main · googleapis/python-genai
Help me with writing code using the Gemini API calling the official libraries and SDKs. Please follow the following guidelines when generating code. 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 AI
ai.google.dev › gemini api › gemini api libraries
Gemini API libraries | Google AI for Developers
April 28, 2026 - When building with the Gemini API, we recommend using the Google GenAI SDK. These are the official, production-ready libraries that we develop and maintain for the most popular languages. They are in General Availability and used in all our official documentation and examples.
Find elsewhere
🌐
Google AI
ai.google.dev › gemini api › getting started with gemini api
Getting started with Gemini API | Google AI for Developers
2 weeks ago - 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(interacti...
🌐
npm
npmjs.com › package › @google › genai
google/genai
1 week ago - 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 codegen_instructions.md when generating Google Gen AI SDK code to guide your model towards using the more recent SDK features.
      » npm install @google/genai
    
Published   Jun 24, 2026
Version   2.10.0
🌐
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 - The google-genai SDK provides a high-level asynchronous interface for managing these connections. ... Session: A persistent connection to the model. Config: Setting up modalities (audio/text), voice, and system instructions.
🌐
Google Cloud
cloud.google.com › blog › topics › developers-practitioners › introducing-google-gen-ai-net-sdk
Introducing Google Gen AI .NET SDK | Google Cloud Blog
October 24, 2025 - This SDK enables C#/.NET developers use Gemini from Google AI or Vertex AI with a single unified library. Let’s take a look at the details. To install the library, run the following command in your .NET project directory: ... First, you need to create a client to talk to Gemini. You can target Gemini on Google AI (via the Gemini Developer API): ... Of course, all of the text and image generation is highly configurable. For example, you can define a response schema and a generation configuration with system instructions and other settings for text generation as follows:
🌐
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 - This SDK supports use cases like: ... For example, with just a few lines of code, you can access Gemini's multimodal capabilities to generate text from text-and-image input. parts := []*genai.Part{ {Text: "What's this image about?"}, {InlineData: ...
Starred by 1.1K users
Forked by 152 users
Languages   Go
🌐
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 - By default, the SDK uses a set of standard configurations. However, you can modify these to suit your needs: 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))
🌐
PyPI
pypi.org › project › google-genai
google-genai · PyPI
2 weeks ago - By default, the SDK uses the beta API endpoints provided by Google to support preview features in the APIs. The stable API endpoints can be selected by setting the API version to v1. To set the API version use http_options. For example, to set the API version to v1 for Vertex AI: from google import genai from google.genai import types client = genai.Client( enterprise=True, project='your-project-id', location='global', http_options=types.HttpOptions(api_version='v1') )
      » pip install google-genai
    
Published   Jun 24, 2026
Version   2.10.0