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

# 获取模型

## 概述

获取特定模型的信息。

## 路径参数

| 参数      | 类型     | 必填 | 描述                  |
| ------- | ------ | -- | ------------------- |
| `model` | string | 是  | 模型 ID（例如 `gpt-5.1`） |

## 响应格式

```json theme={null}
{
  "id": "gpt-5.1",
  "object": "model",
  "created": 1234567890,
  "owned_by": "mountsea"
}
```

## 示例

### 使用 OpenAI SDK

```python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.mountsea.ai/chat"
)

model = client.models.retrieve("gpt-5.1")

print(f"Model ID: {model.id}")
print(f"Owned by: {model.owned_by}")
```

### 使用 cURL

```bash theme={null}
curl https://api.mountsea.ai/chat/models/gpt-5.1 \
  -H "Authorization: Bearer your-api-key"
```

## 错误响应

| 状态码 | 描述                |
| --- | ----------------- |
| 404 | 模型未找到             |
| 401 | 未授权 - 无效的 API Key |


## OpenAPI

````yaml GET /chat/models/{model}
openapi: 3.0.0
info:
  title: Chat AI
  description: API documentation for Chat AI
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.mountsea.ai
    description: API Gateway
security: []
tags:
  - name: chat
    description: ''
paths:
  /chat/models/{model}:
    get:
      tags:
        - Chat - OpenAI Compatible
      summary: 获取模型信息
      operationId: ApiPublicController_getModel
      parameters:
        - name: model
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````