Google List Models
Lists available Gemini models and their basic information.
GET
v1beta/modelsAuthorizations
x-goog-api-keystringheader
鉴权方式 1 — Header:x-goog-api-key: sk-pat-您的AccessToken
keystringquery
鉴权方式 2 — Query 参数:?key=sk-pat-您的AccessToken
密钥的值使用HAI Gateway的个人访问令牌(以 sk-pat- 开头),无需在Google处单独申请 API Key。两种鉴权方式任选其一即可。
Base URL
cURL
Default
curl https://api.hai.network/google/v1beta/models \
-H "x-goog-api-key: sk-pat-您的Access Token"200
Default
{
"models": [
{
"name": "models/gemini-2.5-pro",
"displayName": "gemini-2.5-pro",
"description": "",
"inputTokenLimit": 1048576,
"outputTokenLimit": 65536,
"supportedGenerationMethods": ["generateContent"]
},
{
"name": "models/gemini-2.5-flash",
"displayName": "gemini-2.5-flash",
"description": "",
"inputTokenLimit": 1048576,
"outputTokenLimit": 65536,
"supportedGenerationMethods": ["generateContent"]
}
]
}