获取模型
GET
返回单个模型对象。当前网关对未知模型或部分自定义/双臂渠道模型可能返回 HTTP 200,并在响应体中返回 error.code = "model_not_found";必须同时检查状态码和响应体。判断某个 Key 能否使用模型,以 GET /models 列表为准。
bearerAuthheader
AuthorizationBearer <token>在开发者控制台创建 API Key,并在请求头中使用 Authorization: Bearer <API_KEY>。
model*stringGET /models 返回的公开模型 ID。
OK, or HTTP 200 with an error object for an unknown model
application/json- response
id*string公开模型 ID。
object*string固定 model。
created?integerUnix 秒。部分模型可能是稳定占位值,不要用于业务判断。
owned_by?string模型归属。不要用于权限判断。
supported_endpoint_types?array<string>网关扩展字段,表示可用端点类型,可能随部署变化。
[key: string]?anycurl -X GET 'https://api.pokebot.com/v1/models/MODEL_ID' \ -H 'Authorization: Bearer <API_KEY>'{ "id": "MODEL_ID", "object": "model", "created": 1626777600, "owned_by": "custom", "supported_endpoint_types": [ "openai" ]}未知模型的兼容行为
当前网关对不存在、不可用或部分自定义/双臂渠道模型可能返回 HTTP 200,并在响应体中返回 error.code = "model_not_found"。客户端必须同时检查 HTTP 状态和 error 字段。后续发布计划改为 404 model_not_found;在变更前请按当前兼容行为处理。
详细接口当前直接查询全局模型表,可能不按 Key 的模型权限过滤。判断某个 Key 能否使用模型,以 GET /models 列表为准。
下一步: