# Google Gen AI SDK

> Google's code kit for Gemini. Your code calls the model with one function.

**Field:** Software Development  
**Category:** AI Engineering  
**Also known as:** Google GenAI SDK, Gemini SDK, Gemini API SDK, google-genai, @google/genai

## Think of it like

It is like one key that opens two rooms in the same house.

## Definition

The Google Gen AI SDK is Google's code kit for its Gemini models. It comes in Python, JavaScript, Go, Java and more. One kit works with the Gemini API and with Google Cloud. In Python, you install google-genai and make a client. Then one call sends your text to the model. It took the place of older kits that Google no longer grows.

## Example

Emma swaps an old Gemini package for google-genai. Now the same code runs with her test key at home and on Google Cloud at work.

## Example code

```python
from google import genai

client = genai.Client()  # reads GEMINI_API_KEY
response = client.models.generate_content(
    model="gemini-3.8-flash",
    contents="Hello there",
)
print(response.text)
```

The client reads your key from the environment. One call sends the text and prints the answer.

## Why it matters

One library covers both ways in to Gemini. You can move from a test key to a cloud project without changing your code.

## Common mistake

Copying the setup from an old tutorial. It installs the old kit, and new Gemini features never reach it.

## Three principles

- **One kit, two doors.** Gemini API and Vertex AI.
- **Replaces the old kits.** google-generativeai is the old one.
- **Key from the environment.** GEMINI_API_KEY by default.

## Related terms

- [Client SDK](https://learn.benibix.com/term/development/client-sdk)
- [Anthropic SDK](https://learn.benibix.com/term/development/anthropic-sdk)
- [OpenAI SDK](https://learn.benibix.com/term/development/openai-sdk)
- [Google Agent Development Kit (ADK)](https://learn.benibix.com/term/development/google-adk)
- [Gemini](https://learn.benibix.com/term/ai/gemini)
- [Python](https://learn.benibix.com/term/development/python)

![Your code calls one function in the client SDK. The SDK adds the key, builds the web request and sends it to the model's API. The reply comes back through the SDK as a plain object. A dashed arrow from the reply back to your code is labelled: what happens next is your code's job.](https://learn.benibix.com/diagrams/dev-client-sdk.svg)

---

Source: https://learn.benibix.com/term/development/google-gen-ai-sdk
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
