跳转到主要内容
GET
/
chat
/
models
/
{model}
获取模型信息
curl --request GET \
  --url https://api.mountsea.ai/chat/models/{model} \
  --header 'Authorization: Bearer <token>'

概述

获取特定模型的信息。

路径参数

参数类型必填描述
modelstring模型 ID(例如 gpt-5.1

响应格式

{
  "id": "gpt-5.1",
  "object": "model",
  "created": 1234567890,
  "owned_by": "mountsea"
}

示例

使用 OpenAI SDK

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

curl https://api.mountsea.ai/chat/models/gpt-5.1 \
  -H "Authorization: Bearer your-api-key"

错误响应

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

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

model
string
必填

响应

200 - undefined