> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elkapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出模型（Gemini）

> <ul><li>以 Gemini API 格式返回可用模型列表</li></ul>

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request GET \
    --url 'https://api.elkapi.com/v1beta/models' \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null} theme={null}
  import requests

  url = "https://api.elkapi.com/v1beta/models"
  headers = {
      "Authorization": "Bearer <token>"
  }

  response = requests.request("GET", url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null} theme={null}
  const url = "https://api.elkapi.com/v1beta/models";

  const headers = {
    "Authorization": "Bearer <token>"
  };

  const response = await fetch(url, { method: "GET", headers });
  console.log(await response.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null} theme={null}
  {
    "models": [
      "gemini-3.1-pro-preview"
    ]
  }
  ```
</ResponseExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  所有接口均需要使用 Bearer Token 进行认证。

  在请求头中添加：

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Response

<ResponseField name="models" type="array<object>">
  <ResponseField name="models.name" type="string">
    示例：`models/gemini-pro`
  </ResponseField>

  <ResponseField name="models.version" type="string" />

  <ResponseField name="models.displayName" type="string" />

  <ResponseField name="models.description" type="string" />

  <ResponseField name="models.inputTokenLimit" type="integer" />

  <ResponseField name="models.outputTokenLimit" type="integer" />

  <ResponseField name="models.supportedGenerationMethods" type="array<string>" />
</ResponseField>
