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

# 模型列表

> 查看当前 API Key 可访问的模型

查询当前 API Key 可访问的模型清单，用于接入前确认模型 ID、分组权限与可用渠道。

<RequestExample>
  ```bash cURL theme={null}
  curl https://gogogotoken.ai/v1/models \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "list",
    "data": [
      { "id": "gpt-4o", "object": "model", "owned_by": "openai" },
      { "id": "claude-sonnet-4-20250514", "object": "model", "owned_by": "anthropic" },
      { "id": "gemini-2.5-pro", "object": "model", "owned_by": "google" },
      { "id": "gpt-image-1", "object": "model", "owned_by": "openai" }
    ]
  }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "message": "Invalid API key",
      "type": "invalid_request_error",
      "code": "invalid_api_key"
    }
  }
  ```
</ResponseExample>

## 接口说明

该接口会根据 API Key 的分组、模型限制和当前渠道可用性返回模型列表。模型广场展示的名称、倍率与参考单价以控制台为准。

## 请求头

<ParamField header="Authorization" type="string" required>
  API Key 鉴权信息，格式为 `Bearer YOUR_API_KEY`。
</ParamField>

## 响应体

<ResponseField name="object" type="string">
  固定为 `list`。
</ResponseField>

<ResponseField name="data" type="object[]">
  当前 API Key 可访问的模型数组。

  <ResponseField name="id" type="string">
    模型 ID。调用其他接口时将该值传入 `model` 字段。
  </ResponseField>

  <ResponseField name="object" type="string">
    对象类型，通常为 `model`。
  </ResponseField>

  <ResponseField name="owned_by" type="string">
    模型上游或模型系列归属，例如 `openai`、`anthropic`、`google`。
  </ResponseField>
</ResponseField>

## 使用建议

* 接入前先调用该接口确认模型 ID 是否可用
* 不要长期硬编码 preview 模型，避免模型版本变更导致请求失败
* 如模型未出现在列表中，请检查 API Key 分组权限与余额状态
