cookbook README

The project's README from github.com/google-gemini/cookbook. As one markdown file: README.md.

Welcome to the Gemini API Cookbook

This cookbook provides a structured learning path for using the Gemini API, focusing on hands-on tutorials and practical examples.

For comprehensive API documentation, visit ai.google.dev.

For Gemma quickstarts and examples, check out the Gemma cookbook.


Gemini 3.8 Flash: Our most intelligent Flash model, engineered for long-horizon software engineering, autonomous agents, and complex enterprise workflows. Get started with the Get Started Colab and the thinking Colab guides.

Omni Flash: The Nano Banana of video editing is here! Learn how to call the model using the interactions API, edit videos with natural language and more here Colab!

🍌 Nano-Banana 2: Go bananas with our latest image generation model: Nano-Banana 2. Get started here Colab with 512px, thinking, search and image grounding, and a ton of examples!

🎶 Lyria 3.5: Channel your inner composer with Lyria 3.5. Get started here Colab with full song generation, image-to-music, and a ton of examples!

Agents API: Create and run your custom agents using the new Antigravity agent Colab!


Navigating the Cookbook

This cookbook is organized into two main categories:

  1. Quick Starts: Step-by-step guides covering both introductory topics ("Get Started Colab") and specific API features.
  2. Examples: Practical use cases demonstrating how to combine multiple features.

We also showcase Demos in separate repositories, illustrating end-to-end applications of the Gemini API.

What's New?

Here are the recent additions and updates to the Gemini API and the Cookbook:



1. Quick Starts

The quickstarts section contains step-by-step tutorials to get you started with Gemini and learn about its specific features.

To begin, you'll need:

  1. A Google account.
  2. An API key (create one in Google AI Studio).



We recommend starting with the following:



Then, explore the other quickstarts tutorials to learn about individual features:



2. Examples (Practical Use Cases)

These examples demonstrate how to combine multiple Gemini API features or 3rd-party tools to build more complex applications.



3. Demos (End-to-End Applications)

These fully functional, end-to-end applications showcase the power of Gemini in real-world scenarios.



Official SDKs

The Gemini API is a REST API. You can call it directly using tools like curl (see REST examples or the great Postman workspace), or use one of our official SDKs:



Get Help

Ask a question on the Google AI Developer Forum.

The Gemini API on Google Cloud Vertex AI

For enterprise developers, the Gemini API is also available on Google Cloud Vertex AI. See this repo for examples.

Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

Thank you for developing with the Gemini API! We're excited to see what you create.

cookbook (google-gemini/cookbook)

gemini-api
Searching Database…

17.8K ·GitHub
What is this?Google's official cookbook for the Gemini API: a structured learning path of hands-on tutorials, practical examples, and links to end-to-end demo apps, published as an open-source notebook collection.
Is this a library I install, or something else?Neither — it is a collection of Jupyter notebooks split into Quick Starts (step-by-step guides for the API's features) and Examples (use cases combining several features), with demos kept in separate repositories.
What do I need before I can run anything?Just a Google account and an API key created in Google AI Studio. The recommended path is the Authentication quickstart to wire up the key, then the Get Started notebook on basic prompting and multimodal input.
Do I have to write Python, or are there other SDKs?The API is REST-based, so plain curl works too, and there are official SDKs for Python, Go, Node.js, Java, and C#. The cookbook's own notebooks are written in Python.
Is this built for hobbyists experimenting, or enterprise teams?Both: individuals can grab a key in Google AI Studio and follow the quickstarts, while enterprise developers can use the same Gemini API through Google Cloud Vertex AI, with examples in a companion repo.
Which models and capabilities does the cookbook cover right now?It tracks the latest Gemini releases: 3.8 Flash for long-horizon coding and agents, 3.5 Flash-Lite for high throughput, Omni Flash for conversational video generation and editing, Nano Banana 2 and Pro for image generation up to 4K, Lyria 3.5 for song generation, and Gemini Transcribe for audio transcription.
What kinds of example projects are inside?The Examples section shows feature combinations: a browser as a tool for live web interactions, illustrations for an open-source book, animated stories built from story generation, Imagen and audio synthesis, live plotting and mapping, 3D scene understanding, and cost estimation with health monitoring for API usage.
Are there complete apps to learn from, not just notebooks?Yes — the Demos section links end-to-end apps: the open-source Gemini CLI agent for your terminal, a Python Flask quickstart, a React-based Multimodal Live API web console, a fullstack LangGraph starter, and small Google AI Studio applets.
Can the model ground its answers in search results or my own data?Yes — the Grounding guide covers Google Search, YouTube, URLs, and the newer Google Maps grounding tool, while the File Search quickstart shows a hosted RAG system for grounding generations in your own data.
Size
1006.5 MB
Stars
17.8K
Updated
CommitOct 15
Age
2y
Commits · 90 Days