Skip to content
BENIBIX Learn

Google Gen AI SDK

Development🧬 AI EngineeringLLM APIs

Also known as Google GenAI SDK, Gemini SDK, Gemini API SDK, google-genai, @google/genai

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

Think of it like

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

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.

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.

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 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.
The Google Gen AI SDK is the middle box when the API on the right is Gemini.

Common mistake

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

Key takeaways

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