Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesGemini API & Google AIYour First Gemini API Call
An editing timeline: video frames, an audio track and the text answerThe agent loop: reason, act, observeOne MCP connector linking files, Git and memory
Course

Gemini API & Google AI

Module 1 · Getting Started with Gemini API
01Your First Gemini API Call02Gemini Model Lineup and Choosing for the Task03Generation Parameters and System Instructions
Module 2 · Multimodal Capabilities
04Vision: Images as Input05Audio and Video: Transcription and Understanding06File API: Upload, Limits, Lifecycle
Module 3 · Advanced Generation Features
07Function Calling: Tools for the Model08Search Grounding: Answers Backed by Google09Code Execution: The Built-in Interpreter
Module 4 · Production Patterns
10Streaming Responses11Context Caching: Saving on Repeated Context12Live API: Realtime Voice and Video
Module 5 · Enterprise & Ecosystem
13Agent Platform (formerly Vertex AI): Enterprise Deployment of Gemini14The Google AI Ecosystem: SDKs, Gemma, Embeddings
Gemini API & Google AI · Lesson 1

Your First Gemini API Call

Get an API key in AI Studio, install the Google GenAI SDK (google-genai), make your first Interactions API call to gemini-3.8-flash, and parse the response: status, steps, output_text, usage.

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

Key and tier

Create a key in Google AI Studio: for a new user AI Studio sets up a project and key automatically, and Create API key adds more. Put the key in the GEMINI_API_KEY environment variable. Since May 28, 2026, new keys created in AI Studio are auth keys bound to a service account, and the API rejects requests from unrestricted standard keys.

Never keep the key in your repo, and never call Gemini directly from a browser or mobile app: a key in client-side code is easy to extract. Let your backend make the calls.

What each tier gives you:

TierHow to get itWhat matters
Freean active projectaccess to some models; your requests are used to improve Google products
Tier 1link a billing account (usually with a prepayment of at least $5)requests are not used to improve products, higher limits
Tier 2$100 paid and 3 days since the first paymenthigher limits again
Tier 3$1,000 paid and 30 daysthe highest limits

Limits apply per project, and daily limits reset at midnight Pacific time. Gemini 4 Argon and Gemini 3.1 Pro Preview are unavailable on the Free tier.

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
Key and tierInstall the SDKMinimal call in PythonSame in JavaScriptWhat's inside the responseSafe readingRequest storageWhen you still need generateContentHelpers for your coding agentPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free