The models endpoint provides a way for you to programmatically list the available models, and retrieve extended metadata such as supported functionality and context window sizing. Read more in the Models guide.

Method: models.get

Gets information about a specific Model such as its version number, token limits, parameters and other metadata. Refer to the Gemini models guide for detailed model information.

Endpoint

get https://generativelanguage.googleapis.com/v1beta/{name=models/*}

Path parameters

name string

Required. The resource name of the model.

This name should match a model name returned by the models.list method.

Format: models/{model} It takes the form models/{model}.

Request body

The request body must be empty.

Example request

Python

Go

Shell

Response body

If successful, the response body contains an instance of Model.