Models REST
Copyright 2025 Google LLC.
This notebook demonstrates how to list the models that are available for you to use in the Gemini API, and how to find details about a model in curl.
You can run this in Google Colab, or you can copy/paste the curl commands into your terminal.
To run this notebook, your API key must be stored it in a Colab Secret named GEMINI_API_KEY. If you are running in a different environment, you can store your key in an environment variable. See Authentication to learn more.
Model info
List models
If you GET the models directory, it uses the list method to list all of the models available through the API, including both the Gemini models.
Get model
If you GET a model's URL, the API uses the get method to return information about that model such as version, display name, input token limit, etc.
Learning more
To learn how use a model for prompting, see the Prompting quickstart.
To learn how use a model for embedding, see the Embedding quickstart.
For more information on models, visit the Gemini models documentation.