跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt

Use this file to discover all available pages before exploring further.

以 Google Gemini API 格式返回特定模型的元数据。

路径参数

model
string
必填
模型名称(例如:gemini-2.5-progemini-2.5-flash)。也支持别名。

身份验证

公共模型元数据读取端点不需要身份验证。

响应

name
string
models/{model} 格式的模型资源名称。
displayName
string
人类可读的模型名称。
inputTokenLimit
integer
最大输入 token 数(上下文窗口)。
outputTokenLimit
integer
最大输出 token 数。
supportedGenerationMethods
array
支持的生成方法列表(例如:generateContentcountTokensembedContent)。
version
string
可用时的公开版本字符串。
description
string
可用时的人类可读模型描述。
temperature
number
上游暴露时的默认 temperature。
topP
number
可用时的默认 top-p 值。
topK
integer
可用时的默认 top-k 值。
maxTemperature
number
可用时支持的最大 temperature。

错误

  • 如果 GET 请求错误地带上了 :generateContent:streamGenerateContent,会返回 405 METHOD_NOT_ALLOWED
  • 找不到模型时会返回 404 NOT_FOUND
curl "https://api.tokenlab.sh/v1beta/models/gemini-2.5-pro"
{
  "name": "models/gemini-2.5-pro",
  "version": "1.0",
  "displayName": "gemini-2.5-pro",
  "description": "gemini-2.5-pro model available via TokenLab",
  "inputTokenLimit": 1048576,
  "outputTokenLimit": 65536,
  "supportedGenerationMethods": ["generateContent", "countTokens"],
  "temperature": 1.0,
  "topP": 0.95,
  "topK": 40,
  "maxTemperature": 2.0
}