google.generativeai.get_model#
|  View source on GitHub | 
Calls the API to fetch a model by name.
google.generativeai.get_model(
    name: model_types.AnyModelNameOptions,
    *,
    client=None,
    request_options: (helper_types.RequestOptionsType | None) = None
) -> (model_types.Model | model_types.TunedModel)
import pprint
model = genai.get_model('models/gemini-1.5-flash')
pprint.pprint(model)
| Args | |
|---|---|
| The name of the model to fetch. Should start with  | |
| The client to use. | |
| Options for the request. | |
| Returns | |
|---|---|