> ## 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.

# Get Model

> Get model metadata using Google Gemini API format

Returns metadata for a specific model in Google Gemini API format.

## Path Parameters

<ParamField path="model" type="string" required>
  Model name (e.g., `gemini-2.5-pro`, `gemini-3.5-flash`). Aliases are also accepted.
</ParamField>

## Authentication

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

## Response

<ResponseField name="name" type="string">
  Model resource name in `models/{model}` format.
</ResponseField>

<ResponseField name="displayName" type="string">
  Human-readable model name.
</ResponseField>

<ResponseField name="inputTokenLimit" type="integer">
  Maximum input tokens (context window).
</ResponseField>

<ResponseField name="outputTokenLimit" type="integer">
  Maximum output tokens.
</ResponseField>

<ResponseField name="supportedGenerationMethods" type="array">
  List of supported generation methods (e.g., `generateContent`, `countTokens`, `embedContent`).
</ResponseField>

<ResponseField name="version" type="string">
  Public version string when available.
</ResponseField>

<ResponseField name="description" type="string">
  Human-readable model description when available.
</ResponseField>

<ResponseField name="temperature" type="number">
  Default temperature when the upstream exposes it.
</ResponseField>

<ResponseField name="topP" type="number">
  Default top-p value when available.
</ResponseField>

<ResponseField name="topK" type="integer">
  Default top-k value when available.
</ResponseField>

<ResponseField name="maxTemperature" type="number">
  Maximum supported temperature when available.
</ResponseField>

## Errors

* Invalid GETs that accidentally include `:generateContent` or `:streamGenerateContent` return `405 METHOD_NOT_ALLOWED`.
* Missing models return `404 NOT_FOUND`.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.tokenlab.sh/v1beta/models/gemini-2.5-pro"
  ```

  ```python Python theme={null}
  import google.generativeai as genai

  genai.configure(
      api_key="sk-your-api-key",
      transport="rest",
      client_options={"api_endpoint": "api.tokenlab.sh"}
  )

  model = genai.get_model("models/gemini-2.5-pro")
  print(f"Name: {model.name}")
  print(f"Input limit: {model.input_token_limit}")
  print(f"Output limit: {model.output_token_limit}")
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "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
  }
  ```
</ResponseExample>
