TokenLab

Gemini Native

Get Model

Get model metadata using Google Gemini API format

GET
/v1beta/models/{model}

Returns metadata for one model that accepts Gemini requests, in Google Gemini API format.

Path Parameters

modelstringpathrequired

Model name (e.g., gemini-2.5-pro, gemini-3.5-flash). Aliases are also accepted.

Authentication

Authentication is not required for the public model metadata read endpoint.

Response

namestring

Model resource name in models/{model} format.

baseModelIdstring

Model ID to use in requests. If the path used an alias, this is the model the alias resolves to.

displayNamestring

Human-readable model name.

inputTokenLimitinteger

Maximum input tokens (context window). Omitted when unknown.

outputTokenLimitinteger

Maximum output tokens. Omitted when unknown.

supportedGenerationMethodsarray

Actions you can call on this model are generateContent, streamGenerateContent, and countTokens. An embedding model that accepts Gemini requests lists embedContent and batchEmbedContents instead.

versionstring

Model version. Defaults to the model ID.

descriptionstring

Human-readable model description when available.

temperaturenumber

Default temperature when the model provides one.

topPnumber

Default top-p value when available.

topKinteger

Default top-k value when available.

maxTemperaturenumber

Maximum supported temperature when available.

Errors

  • Invalid GETs that accidentally include :generateContent or :streamGenerateContent return 405 METHOD_NOT_ALLOWED.
  • Unknown models, and models that do not accept Gemini requests, return 404 NOT_FOUND.

Request

curl "https://api.tokenlab.sh/v1beta/models/gemini-2.5-pro"

Response

Response
{
  "name": "models/gemini-2.5-pro",
  "baseModelId": "gemini-2.5-pro",
  "version": "gemini-2.5-pro",
  "displayName": "Gemini 2.5 Pro",
  "description": "gemini-2.5-pro model available via TokenLab",
  "inputTokenLimit": 1048576,
  "outputTokenLimit": 65536,
  "supportedGenerationMethods": [
    "generateContent",
    "streamGenerateContent",
    "countTokens"
  ]
}

Path Parameters

model*string

Model name or alias (e.g., gemini-2.5-pro)

Response

application/json

application/json

application/json

application/json