Lists models available through the API.
HTTP request
GET https://generativelanguage.googleapis.com/v1beta3/models
The URL uses gRPC Transcoding syntax.
For example:
curl https://generativelanguage.googleapis.com/v1beta2/models?key=$PALM_API_KEY
{
"models": [
{
"name": "models/chat-bison-001",
...
},
{
"name": "models/text-bison-001",
...
},
{
"name": "models/embedding-gecko-001",
...
}
]
}
Query parameters
Parameters | |
---|---|
pageSize |
The maximum number of The service may return fewer models. If unspecified, at most 50 models will be returned per page. This method returns at most 1000 models per page, even if you pass a larger pageSize. |
pageToken |
A page token, received from a previous Provide the When paginating, all other parameters provided to |
Request body
The request body must be empty.
Response body
Response from ListModel
containing a paginated list of Models.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"models": [
{
object ( |
Fields | |
---|---|
models[] |
The returned Models. |
nextPageToken |
A token, which can be sent as If this field is omitted, there are no more pages. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/generative-language
https://www.googleapis.com/auth/generative-language.tuning
https://www.googleapis.com/auth/generative-language.tuning.readonly
For more information, see the Authentication Overview.