Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesGemini Cookbook: Based on Google MaterialsFirst Steps with the Gemini API
A grid of numbers where code has marked the primesClaude Code terminal: the claude -p command with Read and Edit allowedRetries after a 429 error: each pause is twice as long, then success
Course

Gemini Cookbook: Based on Google Materials

Module 1 · Getting Started with Google GenAI SDK
01First Steps with the Gemini API
Module 2 · Function Calling
02Function Calling in the Gemini API
Module 3 · Working with Audio
03Audio in the Gemini API
Module 4 · File API
04File API: Uploading and Using Files
Module 5 · Context Caching
05Context Caching: Cache Large Documents
Module 6 · Code Execution
06Code Execution: Python Inside Gemini
Module 7 · Embeddings
07Embeddings: Vector Representations in Gemini
Module 8 · Live API
08Live API: Real-Time Multimodal Sessions
Gemini Cookbook: Based on Google Materials · Lesson 1

First Steps with the Gemini API

Install the google-genai SDK, pick a model (3.8 Flash, 3.5 Flash-Lite or 4 Argon), make your first Interactions API call, and cover system instructions, conversations via previous_interaction_id, token counting, thinking_level and the retirement of temperature, top_p and top_k, multimodal input and handling blocked requests.

25 min readUpdated Nov 9, 20263 questions in quizReady prompt included

Installation and Client Initialization

pip install -U 'google-genai>=2.3.0'

The Interactions API is available in google-genai 2.3.0 and later. The latest Python SDK release is v3.0.0 (November 6, 2026). In a real project, pin the version in requirements so the next SDK update does not break your code.

from google import genai

client = genai.Client()  # reads the key from GEMINI_API_KEY
MODEL_ID = "gemini-3.8-flash"

The rest of this lesson opens after a free sign-up

Sign up with email or Google: the first two lessons of every course stay open for good, and the whole catalog is open for 7 days. No card needed.

Sign up freeOr a trial lesson, no sign-up →
In this lesson
Installation and Client InitializationChoosing a ModelFirst Request with the Interactions APISystem InstructionsConversations Without Resending HistoryCounting TokensGeneration ParametersMultimodal InputWhen a Request Is BlockedPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free