Gemini 格式获取
GET /v1beta/models
以 Gemini API 格式返回可用模型列表
基本信息
| 项目 | 内容 |
|---|---|
| Base URL | https://www.yunzhuhub.cn |
| 标签 | 获取模型列表 |
| Operation ID | listModelsGemini |
认证
- BearerAuth:使用 Bearer Token 认证。 格式:
Authorization: Bearer sk-xxxxxx
密钥安全
请只使用你自己的 API Key。示例中的 <YOUR_API_KEY> 必须在本地替换,不要把真实密钥提交到代码仓库或发送给他人。
参数
无额外路径或查询参数。
请求体
此接口没有请求体。
请求示例
以下示例只用于复制到本地终端,不会从文档站发送请求。
bash
curl --request GET 'https://www.yunzhuhub.cn/v1beta/models' \
--header 'Authorization: Bearer <YOUR_API_KEY>'响应
200 成功获取模型列表
json
{
"title": "GeminiModelsResponse",
"type": "object",
"properties": {
"models": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "models/gemini-pro"
},
"version": {
"type": "string"
},
"displayName": {
"type": "string"
},
"description": {
"type": "string"
},
"inputTokenLimit": {
"type": "integer"
},
"outputTokenLimit": {
"type": "integer"
},
"supportedGenerationMethods": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}