Back to library
AI
tutorial

Accelerate Your Gemini Integration with the Official SDK

Use the Google Gen AI SDK to jumpstart your development.

Leverage the official Google Gen AI SDKs for Python or JavaScript to make your first AI call in under a minute.

Google Gemini

The Scenario

You are a developer starting a new project and need to integrate LLM capabilities quickly without getting bogged down in REST API documentation.

Before & after

The old way

Manually researching API endpoints, setting up raw HTTP requests, and handling authentication headers can take 30–45 minutes for a first-time setup.

With AI

Install the Google Gen AI SDK (`google-genai`) and initialize the client to generate text or handle multimodal prompts. Using the SDK reduces setup time to roughly 2–5 minutes.

The Prompt

I want to start using the Gemini API in Python. Can you provide a boilerplate script using the latest `google-genai` SDK that initializes a client using an environment variable 'GEMINI_API_KEY' and sends a simple test prompt '[YOUR_PROMPT]'?

For Python developers, use `pip install -U google-genai`. This ensures you are using the latest 'Interactions API' patterns which simplify how the model handles text, images, and tools in a single unified flow.

Source

Release notes  |  Gemini API  |  Google AI for Developers
"Install the SDK and generate text with a single API call... pip install -U google-genai"