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.
This cookbook is organized into two main categories:
We also showcase Demos in separate repositories, illustrating end-to-end applications of the Gemini API.
Here are the recent additions and updates to the Gemini API and the Cookbook:
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:
We recommend starting with the following:
Then, explore the other quickstarts tutorials to learn about individual features:
These examples demonstrate how to combine multiple Gemini API features or 3rd-party tools to build more complex applications.
These fully functional, end-to-end applications showcase the power of Gemini in real-world scenarios.
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:
With Gemini 2 we are offering a new SDK (google-genai
, v1.0
). The updated SDK is fully compatible with all Gemini API models and features, including recent additions like the live API (audio + video streaming), improved tool usage ( code execution, function calling and integrated Google search grounding), and media generation (Imagen and Veo). This SDK allows you to connect to the Gemini API through either Google AI Studio or Vertex AI.
The google-generativeai
package will continue to support the original Gemini models. It can also be used with Gemini 2 models, just with a limited feature set. All new features will be developed in the new Google GenAI SDK.
See the migration guide for details.
Ask a question on the Google AI Developer Forum.
The Gemini API on Google Cloud Vertex AIFor enterprise developers, the Gemini API is also available on Google Cloud Vertex AI. See this repo for examples.
Contributions are welcome! See CONTRIBUTING.md for details.
Thank you for developing with the Gemini API! We're excited to see what you create.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4