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

# 模型列表

> 查询当前 API Key 可用模型，兼容 OpenAI、Claude 与 Gemini 风格。

# 模型列表

查询可用模型列表。路由会根据请求头判断兼容格式：默认返回 OpenAI 风格；带 `x-api-key` 和 `anthropic-version` 时走 Claude 风格；带 `x-goog-api-key` 或 `key` 查询参数时走 Gemini 风格。

<Info>
  如果你只是想先知道“系统里大概有哪些文本模型名字”，不想立刻发接口请求，可以先看 [文本模型支持矩阵](/zh/texts/model-matrix) 里的“常见模型名称示例”。但真正对你当前 key 可用的模型，仍以本页接口返回为准。
</Info>

## 常见模型名称示例

| 家族           | 常见模型名                                                                                                          |
| ------------ | -------------------------------------------------------------------------------------------------------------- |
| GPT / OpenAI | `gpt-4o`、`gpt-4o-mini`、`gpt-4.1`、`gpt-4.1-mini`、`gpt-4.1-nano`、`o1`、`o3`                                       |
| Claude       | `claude-sonnet-4-20250514`、`claude-sonnet-4-6`、`claude-opus-4-6`、`claude-opus-4-7`、`claude-haiku-4-5-20251001` |
| Gemini       | `gemini-2.0-flash`、`gemini-2.5-flash`、`gemini-2.5-pro`、`gemini-3.1-pro-preview`                                |
| DeepSeek     | `deepseek-chat`、`deepseek-reasoner`、`deepseek-v4-flash`、`deepseek-v4-pro`、`deepseek-r1`                        |
| Qwen         | `qwen-max`、`qwen3-max`、`qwen3-omni-flash`                                                                      |

## 路径

| Method | Path                    | 说明                          |
| ------ | ----------------------- | --------------------------- |
| `GET`  | `/v1/models`            | OpenAI/Claude/Gemini 兼容模型列表 |
| `GET`  | `/v1/models/{model}`    | 查询单个模型                      |
| `GET`  | `/v1beta/models`        | Gemini 原生模型列表               |
| `GET`  | `/v1beta/openai/models` | Gemini 下的 OpenAI 兼容模型列表     |

## 请求示例

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

### Claude 风格

```bash theme={null}
curl https://octopusx.ai/v1/models \
  -H "x-api-key: YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01"
```

### Gemini 风格

```bash theme={null}
curl https://octopusx.ai/v1beta/models \
  -H "x-goog-api-key: YOUR_API_KEY"
```

## 响应示例

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "list",
    "data": [
      {
        "id": "gpt-4o",
        "object": "model",
        "created": 1735689600,
        "owned_by": "openai"
      },
      {
        "id": "claude-sonnet-4-20250514",
        "object": "model",
        "created": 1735689600,
        "owned_by": "anthropic"
      }
    ]
  }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "message": "Invalid API key provided",
      "type": "invalid_request_error",
      "param": "",
      "code": "invalid_api_key"
    }
  }
  ```

  ```json 429 theme={null}
  {
    "error": {
      "message": "当前请求频率过高，请稍后再试",
      "type": "new_api_error",
      "param": "",
      "code": "too_many_requests"
    }
  }
  ```

  ```json 500 theme={null}
  {
    "error": {
      "message": "bad response body",
      "type": "new_api_error",
      "param": "",
      "code": "bad_response_body"
    }
  }
  ```
</ResponseExample>

### 查询单个模型

```bash theme={null}
curl https://octopusx.ai/v1/models/gpt-4o \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## 相关接口

* [通用对话接口（默认非流式）](./chat-completions-non-stream)
* [Gemini 原生格式](./gemini-native)
